Howard Hinnant
b24c802489
Debug mode for unordered_set. I believe this to be fairly complete for
...
unordered_set, however it is not complete yet for unordered_multiset,
unordered_map or unordered_multimap. There has been a lot of work done
for these other three containers, however that work was done just to
keep all of the tests passing.
You can try this out with -D_LIBCPP_DEBUG2. You will have to link to a
libc++.dylib that has been compiled with src/debug.cpp. So far, vector
(but not vector<bool>), list, and unordered_set are treated. I hope to
get the other three unordered containers up fairly quickly now that
unordered_set is done.
The flag _LIBCPP_DEBUG2 will eventually be changed to _LIBCPP_DEBUG, but
not today. This is my second effort at getting debug mode going for
libc++, and I'm not quite yet ready to throw all of the work under the
first attempt away.
The basic design is that all of the debug information is kept in a
central database, instead of in the containers. This has been done as
an attempt to have debug mode and non-debug mode be ABI compatible with
each other. There are some circumstances where if you construct a
container in an environment without debug mode and pass it into debug
mode, the checking will get confused and let you know with a readable
error message. Passing containers the other way: from debug mode out to
a non-debugging mode container should be 100% safe (at least that is the
goal).
llvm-svn: 186991
2013-07-23 22:01:58 +00:00
Marshall Clow
ca0be23b39
Implement string suffixes from N3642
...
llvm-svn: 186956
2013-07-23 17:05:24 +00:00
Howard Hinnant
7491a16031
Bill Fisher: This patch fixes a bug where std::regex in ECMAScript mode was ignoring capture groups inside lookahead assertions.
...
For example, matching /(?=(a))(a)/ to "a" should yield two captures: \1 = "a", \2 = "a"
llvm-svn: 186954
2013-07-23 16:18:04 +00:00
Anders Carlsson
8bb1dbbf75
Fix a bug in std::fill_n where memset would end up being called in cases when it shouldn’t.
...
Reviewed by Howard.
llvm-svn: 186875
2013-07-22 21:08:00 +00:00
Marshall Clow
75eff74803
Make tuple's constructor and std::get<>(tuple) constexpr. Final stage of fixing bug #16599 . Thanks to Howard for the review and updates.
...
llvm-svn: 186834
2013-07-22 16:02:19 +00:00
Marshall Clow
8bf1f08a2c
Make std::get constexpr
...
llvm-svn: 186525
2013-07-17 18:25:36 +00:00
Howard Hinnant
fee09c68a0
Add pointer format test for Windows.
...
llvm-svn: 186472
2013-07-16 23:50:06 +00:00
Marshall Clow
18191ceb54
Bug 16599 part 2: Make std::pair's constructors and comparison operators (and make_pair) constexpr.
...
llvm-svn: 186430
2013-07-16 17:45:44 +00:00
Marshall Clow
1c682f0f0c
Make std::forward and std::move (and std::move_if_noexcept) constexpr in C++14
...
llvm-svn: 186344
2013-07-15 20:46:11 +00:00
Howard Hinnant
22161401df
Bill Fisher: This patch fixes an ill-formed comparison when parsing control escapes, e.g. "\cA\ca". The code will now throw an error_escape exception for invalid control sequences like "\c:" or "\c".
...
I've added the test cases to bad_escape.pass.cpp.
llvm-svn: 186335
2013-07-15 18:21:11 +00:00
Howard Hinnant
10f8387b94
A few fixes to tests for Windows port.
...
llvm-svn: 186334
2013-07-15 18:09:11 +00:00
Marshall Clow
e99520c72e
Implement n3584 - Addressing Tuples by Type
...
llvm-svn: 186237
2013-07-13 02:54:05 +00:00
Howard Hinnant
6d8a38c537
Port make_[un]signed tests to platforms where sizeof(wchar_t) == 2.
...
llvm-svn: 186136
2013-07-11 23:51:05 +00:00
Howard Hinnant
c815a4e297
Bill Fisher: This patch fixes a less likely case where '\b' can back up into invalid memory, when driven by a regex_iterator (for case 1, see r185273 or http://llvm.org/bugs/show_bug.cgi?id=16240 )
...
The attached test program also supplies a test for the case 1 fix in r185273.
llvm-svn: 186089
2013-07-11 15:32:55 +00:00
Marshall Clow
48c9fe29b2
Improved tests (and fixed a bug in the tests); thanks to Richard Smith for the suggestion
...
llvm-svn: 186022
2013-07-10 18:01:34 +00:00
Howard Hinnant
dbdeb153d8
Bill Fisher: This patch fixes a bug where regex_iterator doesn't indicate when it's restarting in the middle of a string. This bug causes /^a/ to match in the middle of the string "aaaaaaa", during iteration.
...
My patch uses to communicate when is false.
llvm-svn: 185950
2013-07-09 17:29:09 +00:00
Howard Hinnant
e0fe3d2e96
War on tabs.
...
llvm-svn: 185865
2013-07-08 21:06:38 +00:00
Marshall Clow
a7b0e5ddf8
Implement n3668 - std::exchange
...
llvm-svn: 185863
2013-07-08 20:54:40 +00:00
Marshall Clow
f331327c6a
Implement n3545 for c++14
...
llvm-svn: 185856
2013-07-08 20:05:31 +00:00
Howard Hinnant
271426e6ab
Windows port for __codecvt_utf8<wchar_t>.
...
llvm-svn: 185849
2013-07-08 19:03:07 +00:00
Howard Hinnant
5e00063b86
Silence -Wint-to-void-pointer-cast warning in test.
...
llvm-svn: 185756
2013-07-06 14:41:36 +00:00
Howard Hinnant
abb160e689
Remove implicit conversion from __value_type to value_type in [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16549
...
llvm-svn: 185711
2013-07-05 18:06:00 +00:00
Howard Hinnant
4a95f9eb7e
Removed extension in [unordered_][multi]map which allowed one to emplace using just an argument for the key, as opposed to using piecewise_construct. However a bug report exposed that this created an unfortunate ambiguity. People who are currently using the extension will be notified the next time they compile, and will have to change to using piecewise_construct. There are no ABI issues with the removal of this extension. This fixes http://llvm.org/bugs/show_bug.cgi?id=16542
...
llvm-svn: 185666
2013-07-04 20:59:16 +00:00
Howard Hinnant
bbdf669bde
Simplify comparators of [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16538
...
llvm-svn: 185665
2013-07-04 19:46:35 +00:00
Joerg Sonnenberger
0644627bef
Fix bashism.
...
llvm-svn: 185646
2013-07-04 15:11:10 +00:00
Marshall Clow
5b2ef2b1a6
Patch for N3655 (Transformation type traits) with Howard's additions
...
llvm-svn: 185597
2013-07-04 00:10:01 +00:00
Howard Hinnant
3fc9ef22b3
Constrain launch ~ operator to defined bits.
...
llvm-svn: 185452
2013-07-02 18:01:41 +00:00
Howard Hinnant
43bbdd29de
Bill Fisher: This patch fixes a bug where the regex parser doesn't advance the pointer after reading the third character of an octal escape (in awk mode).
...
That is, regex{"\141", awk} results in the regular expression /a1/ instead of just /a/.
llvm-svn: 185449
2013-07-02 17:43:31 +00:00
Howard Hinnant
4a142ec6b0
XFAIL this test on 10.7 and 10.8
...
llvm-svn: 185391
2013-07-01 22:59:14 +00:00
Marshall Clow
28d8ba5f79
Implement n3656 - make_unique. Thanks to Howard for the review and suggestions.
...
llvm-svn: 185352
2013-07-01 18:16:03 +00:00
Marshall Clow
d51891063f
Implement n3658 - Compile-time integer sequences
...
llvm-svn: 185343
2013-07-01 16:26:55 +00:00
Howard Hinnant
eecacc0fad
In istream::ignore, check the delimeter as an int_type, not as a char_type, so as to correctly handle EOF. This fixes http://llvm.org/bugs/show_bug.cgi?id=16427
...
llvm-svn: 185298
2013-07-01 00:37:50 +00:00
Howard Hinnant
9dbbf8dece
The bind and function functor constructors and assignment operators were overly general and getting confused with the copy constructor and copy assignment operators. Constrained them. This fixes http://llvm.org/bugs/show_bug.cgi?id=16385
...
llvm-svn: 185297
2013-07-01 00:01:51 +00:00
Howard Hinnant
9bf42533b7
Fix bind by making _is_valid_bind_return more robust. It should return false instead of give a compile time error, always. The problem was down in ____mu_return, the version that handles nested bind objects. This fixes http://llvm.org/bugs/show_bug.cgi?id=16343
...
llvm-svn: 185289
2013-06-30 19:48:15 +00:00
Howard Hinnant
1836462545
Add operators to make launch a bitmask type. Searched all of the standard, and libc++ to see if this error occurred elsewhere and didn't see any other place. This fixes http://llvm.org/bugs/show_bug.cgi?id=16207
...
llvm-svn: 185265
2013-06-29 18:38:17 +00:00
Howard Hinnant
3f75953d82
Provide missing '{' in parsing extended quoted characters. This fixes http://llvm.org/bugs/show_bug.cgi?id=16135
...
llvm-svn: 185211
2013-06-28 20:31:05 +00:00
Howard Hinnant
8d1e822432
William Fisher: A bug in __lookahead::exec causes /(?=^)b/ to match ab. When makes a recursive call to , it passes true for the value of . This causes a beginning-of-line anchor (^) inside a lookahead assertion to match anywhere in the text. This fixes http://llvm.org/bugs/show_bug.cgi?id=11118
...
llvm-svn: 185196
2013-06-28 19:11:23 +00:00
Howard Hinnant
21246e3314
Bill Fisher: Fix for failing to throw an exception in regex when parsing an invalid escape sequence. This fixes http://llvm.org/bugs/show_bug.cgi?id=16023
...
llvm-svn: 185192
2013-06-28 18:57:30 +00:00
Howard Hinnant
eec721826c
Implement full support for non-pointer pointers in custom allocators for string. This completes the custom pointer support for the entire library.
...
llvm-svn: 185167
2013-06-28 16:59:19 +00:00
Howard Hinnant
3ec1f00b73
Implement full support for non-pointer pointers in custom allocators for vector.
...
llvm-svn: 185093
2013-06-27 19:35:32 +00:00
Howard Hinnant
866d4efa7f
Implement full support for non-pointer pointers in custom allocators for list.
...
llvm-svn: 184859
2013-06-25 16:08:47 +00:00
Howard Hinnant
8a27ba8051
Implement full support for non-pointer pointers in custom allocators for forward_list.
...
llvm-svn: 184759
2013-06-24 17:17:28 +00:00
Howard Hinnant
14e200d14d
Implement full support for non-pointer pointers in custom allocators for deque.
...
llvm-svn: 184673
2013-06-23 21:17:24 +00:00
Howard Hinnant
307f814372
Implement full support for non-pointer types in custom allocators. This is for the unordered containers only. This work still needs to be done on the sequence containers.
...
llvm-svn: 184635
2013-06-22 15:21:29 +00:00
Howard Hinnant
07d3eccd26
Implement full support for non-pointer types in custom allocators. This is for the associative containers only. This work still needs to be done on the unordered and sequence containers. Fixes http://llvm.org/bugs/show_bug.cgi?id=15978
...
llvm-svn: 184358
2013-06-19 21:29:40 +00:00
Howard Hinnant
e7b6d544f0
Test case for r183481.
...
llvm-svn: 183522
2013-06-07 14:24:18 +00:00
Howard Hinnant
849821cffb
Fix a couple of bugs in linear_congruential_engine::seed. Regression test added.
...
llvm-svn: 182421
2013-05-21 21:05:12 +00:00
Howard Hinnant
0125ab809f
Remove cv qualifiers from member pointers in the __member_pointer_traits test. This was causing a const-qualified bind result to malfunction. This was a recent regression due to the new use of __member_pointer_traits in restricting the __invokable and __invoke_of tests.
...
llvm-svn: 181935
2013-05-15 21:49:27 +00:00
David Dean
a9ac518364
XFAIL this test when using the darwin12 system library. Reviewed by Howard
...
llvm-svn: 181610
2013-05-10 17:25:57 +00:00
Marshall Clow
0b0bbd2f22
Implement n3607: 'equal', 'mismatch', and 'is_permutation'
...
llvm-svn: 181548
2013-05-09 21:14:23 +00:00