Marshall Clow
a1cd191624
Implement constexpr (n3302) and fix operator *= and /=
...
llvm-svn: 187529
2013-07-31 21:02:34 +00:00
Marshall Clow
df67172d59
Backwards!
...
llvm-svn: 187518
2013-07-31 19:39:37 +00:00
Marshall Clow
a1d0d376c8
Implement n3469 - constexpr for chrono
...
llvm-svn: 187517
2013-07-31 19:32:19 +00:00
Howard Hinnant
4c80bfbd53
Debug mode for unordered_multimap. Some mods were done for unordered_map as well to keep all the tests passing. However unordered_map is at the very least still missing tests, if not functionality (if it isn't tested, it probably isn't working).
...
llvm-svn: 187446
2013-07-30 21:04:42 +00:00
Howard Hinnant
e5c13decbe
Debug mode for unordered_multiset. The exercise spotted a few places I had missed on unordered_set, so I picked those up as well.
...
There are actually two debug modes:
1. -D_LIBCPP_DEBUG2 or -D_LIBCPP_DEBUG2=1
This is a relatively expensive debug mode, but very thorough. This is normally what you want to debug with, but may turn O(1) operations into O(N) operations.
2. -D_LIBCPP_DEBUG2=0
This is "debug lite." Only preconditions that can be checked with O(1) expense are checked. For example range checking on an indexing operation. But not iterator validity.
llvm-svn: 187369
2013-07-29 19:05:47 +00:00
Marshall Clow
83c08b4497
Implement N3421; comparison predicates<void>
...
llvm-svn: 187357
2013-07-29 14:21:53 +00:00
Marshall Clow
7aa54577d1
literal suffixes for std::chrono
...
llvm-svn: 187078
2013-07-24 21:18:14 +00:00
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
Richard Smith
79c06417d1
Add some missing cv-qualifiers.
...
llvm-svn: 186909
2013-07-23 01:24:30 +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
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
Marshall Clow
f20d2672e2
Add macro _LIBCPP_CONSTEXPR_AFTER_CXX11 for functions that have been marked constexpr post C++11
...
llvm-svn: 186323
2013-07-15 14:57:19 +00:00
Marshall Clow
e99520c72e
Implement n3584 - Addressing Tuples by Type
...
llvm-svn: 186237
2013-07-13 02:54: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
8e1cb5adb3
move __save_flags from <random> to <ios> in preparation for reuse; no functionality change
...
llvm-svn: 185968
2013-07-09 20:34:14 +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
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
Marshall Clow
5b2ef2b1a6
Patch for N3655 (Transformation type traits) with Howard's additions
...
llvm-svn: 185597
2013-07-04 00:10:01 +00:00
Marshall Clow
60df5996a4
Commit patch for integer sequences. Suggested by Richard, reworked by Howard, and annotated by me
...
llvm-svn: 185569
2013-07-03 19:20:30 +00:00
Howard Hinnant
84b569d5cf
Matthew Dempsky: Attached patch replaces the type punning with memcpy(), which on
...
x86/x86-64 clang optimizes to direct word accesses anyway. This fixes an unaligned word access in murmurhash/cityhash.
llvm-svn: 185558
2013-07-03 17:39:28 +00:00
Marshall Clow
95ddb53049
Adorn make_unique with visibility and inline attributes
...
llvm-svn: 185468
2013-07-02 20:06:09 +00:00
Howard Hinnant
9cfcdcb9e2
Matthew Dempsky: In libc++'s <locale>, there's already dependence on an snprintf_l
...
implementation and all of the char buffers readily have their
allocated size available, so we can easily use snprintf_l instead of
sprintf_l.
This avoids OpenBSD's linker warnings against using sprintf and
vsprintf.
Howard: Please consider a patch for CREDITS.TXT
llvm-svn: 185457
2013-07-02 18:42:28 +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
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
660f2ae422
Prevent '\b' from backing up into invalid memory. Fixes http://llvm.org/bugs/show_bug.cgi?id=16240 . Sorry, I can not think of a good test case for this one, except by running valgrind as reported in the bug.
...
llvm-svn: 185273
2013-06-29 23:45:43 +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
e9672d0448
Make cout a little more thread-safe. This fixes http://llvm.org/bugs/show_bug.cgi?id=12158
...
llvm-svn: 185222
2013-06-28 21:40:28 +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
afe8b967cc
Dimitry Andric: Add const to constexpr member functions in order to cope with new C++1y language rules. This silences -Wconstexpr-not-const warnings.
...
llvm-svn: 185181
2013-06-28 18:09:35 +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
Dmitri Gribenko
c3f9c80894
Fix typo in assertion message. Reported by Shriramana Sharma.
...
llvm-svn: 184691
2013-06-24 06:15:57 +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
30444adc70
Minor bug fix for allowing an extension of const-qualified types in containers.
...
llvm-svn: 183481
2013-06-07 01:56:37 +00:00
Howard Hinnant
9d3ccc700f
Neglected to remove a debugging comment from last commit.
...
llvm-svn: 182422
2013-05-21 21:19:35 +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
Joerg Sonnenberger
50544e7e65
Add NetBSD support.
...
llvm-svn: 182162
2013-05-17 21:17:34 +00:00
Howard Hinnant
9daaf5775c
Glen: This patch gets the string conversion functions working on Windows. It also refactors repetitive code in string.cpp do greatly reduce the repetitiveness, increasing maintainability.
...
llvm-svn: 182026
2013-05-16 17:13:40 +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 Blaikie
f13dbe4799
Fixing the MSan/compiler-rt build
...
Patch by Evgieniy Stepanov, review by İsmail Dönmez.
llvm-svn: 181740
2013-05-13 21:53:44 +00:00
Howard Hinnant
9449989601
İsmail Dönmez: Enable quick_exit on linux.
...
llvm-svn: 181612
2013-05-10 17:36:59 +00:00
Marshall Clow
fce85ba455
Fix incorrect type usage; nice catch by Sebastian
...
llvm-svn: 181569
2013-05-10 00:16:10 +00:00
Marshall Clow
0b0bbd2f22
Implement n3607: 'equal', 'mismatch', and 'is_permutation'
...
llvm-svn: 181548
2013-05-09 21:14:23 +00:00
Howard Hinnant
266abefed0
Put a 1-character unget buffer into cin. This fixes http://llvm.org/bugs/show_bug.cgi?id=15867
...
llvm-svn: 181470
2013-05-08 21:18:42 +00:00
Howard Hinnant
866ed94db1
Constrain __invoke functions more accurately. This fixes http://llvm.org/bugs/show_bug.cgi?id=15861 .
...
llvm-svn: 181377
2013-05-07 23:40:12 +00:00
Howard Hinnant
81aa5cb804
Introduce _LIBCPP_STD_VER. This can be set by the client (or the clang driver). Or it will be defaulted. The default is 11 if -std= c++11 or eariler, else it will default to the current year modulo the century. We anticipate it defaulting to 14 for C++14 when the time comes. For now, post-C++11 libcxx implementations should protect themselves with #if _LIBCPP_STD_VER > 11.
...
llvm-svn: 181347
2013-05-07 20:16:13 +00:00
Howard Hinnant
eedfabd96e
Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .
...
llvm-svn: 181217
2013-05-06 16:58:36 +00:00
Howard Hinnant
da9ca0b405
Stephan Tolksdorf: fixes the issue in the <atomic> header and adds corresponding tests. I've used macros to fall back to a user-provided default constructor if _LIBCPP_HAS_NO_DEFAULTED_FUNCTIONS (though I suspect that there won't be many users defining that macro).
...
The tests use placement new to check that atomic values get properly zero-initialized. I had to modify the atomic_is_lock_free test, because default initialization of an object of const type 'const A' (aka 'const atomic<int>') requires a user-provided default constructor.
llvm-svn: 180945
2013-05-02 20:18:43 +00:00
Howard Hinnant
35abaab7d3
This patch introduces an alternative layout for basic_string which when the string is short, the data pointer will be word-aligned. It can be activated with -D_LIBCPP_ALTERNATE_STRING_LAYOUT. These two different layouts (the default and _LIBCPP_ALTERNATE_STRING_LAYOUT) are not ABI compatible with each other. Once one is chosen for a given platform, it is disruptive to change it.
...
llvm-svn: 180811
2013-04-30 21:44:48 +00:00
Joerg Sonnenberger
21883e9478
Use protected version of the malloc attribute in case source wants to
...
define malloc as macro.
llvm-svn: 180727
2013-04-29 19:52:08 +00:00
Joerg Sonnenberger
a39fe8c59e
GCC doesn't support __has_attribute.
...
llvm-svn: 180683
2013-04-27 20:51:42 +00:00
Howard Hinnant
03ec04f9b5
default_delete needs a static_assert against void types. I had previously thought that sizeof(void) would take care of this. I was wrong.
...
llvm-svn: 180213
2013-04-24 19:44:26 +00:00
Howard Hinnant
210051548e
Modest performance improvement for std::string's operator==.
...
llvm-svn: 180072
2013-04-22 23:55:13 +00:00
Howard Hinnant
20428e94e0
Somehow aligned_union got dropped through the cracks. This adds it. Did a drive-by fix of alignment_of while I was in the neighborhood.
...
llvm-svn: 180036
2013-04-22 19:37:49 +00:00
Howard Hinnant
ab65a6f560
After years of telling people: 'If you ever find any of my code that self-move-assigns, send me a bug report.' Somebody finally took me up on it. vector::erase(begin(), begin()) does a self-move-assign of every element in the vector, leaving all of those elements in an unspecified state. I checked the other containers for this same bug and did not find it. Added test case.
...
llvm-svn: 179760
2013-04-18 15:02:57 +00:00
Howard Hinnant
c76d2bda6f
addressof misbehaving for type with an implicit conversion operator to char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754
...
llvm-svn: 179608
2013-04-16 17:27:56 +00:00
Howard Hinnant
e7389a6915
Numeric parsing was getting the wrong answer when faced with very long inputs. This fixes both http://llvm.org/bugs/show_bug.cgi?id=15751 and http://llvm.org/bugs/show_bug.cgi?id=15740
...
llvm-svn: 179556
2013-04-15 20:40:06 +00:00
Howard Hinnant
f3b02b17af
Accidentally disallowed explicit tuple conversions when all elements of the tuple can be explicitly converted.
...
llvm-svn: 179467
2013-04-14 00:01:13 +00:00
Howard Hinnant
40487ca25e
Set failbit when strtold sets errno to ERANGE when parsing floating point values.
...
llvm-svn: 179461
2013-04-13 18:19:25 +00:00
Howard Hinnant
24afdf71c1
Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building.
...
llvm-svn: 179408
2013-04-12 20:22:57 +00:00
Howard Hinnant
98381453c0
Change <cwchar> and <cstring> to look out for flags which may or may not be set by the C headers <wchar.h> and <string.h> indicating C support for the C++-altered wcschr, wcspbrk, wcsrchr, wcsstr, wmemchr, strchr, strpbrk, strrchr, memchr, and strstr. This was already done in <cstring> for other platforms using other flags, so just had to add one more flag to the list there.
...
llvm-svn: 179041
2013-04-08 18:59:28 +00:00
Howard Hinnant
f750923161
Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.
...
llvm-svn: 178892
2013-04-05 17:58:52 +00:00
Howard Hinnant
b0e4c9d01b
More work on debug mode for list.
...
llvm-svn: 178819
2013-04-05 00:18:49 +00:00
Howard Hinnant
b13fcad677
Somehow search_n never got tested, so of course it had a bug in it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15667 .
...
llvm-svn: 178764
2013-04-04 15:40:48 +00:00
Howard Hinnant
ea48b6dcd0
Fix stupid but harmless type-o. Fixes http://llvm.org/bugs/show_bug.cgi?id=15657 .
...
llvm-svn: 178691
2013-04-03 20:29:45 +00:00
Howard Hinnant
1347d33451
The move / swap members were not correctly taking all of the possible states of the basic_stringbuf into account. Just rewrote these members. Test included. This fixes http://llvm.org/bugs/show_bug.cgi?id=15659 .
...
llvm-svn: 178690
2013-04-03 20:21:29 +00:00
Howard Hinnant
459448241a
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html
...
llvm-svn: 178581
2013-04-02 22:14:51 +00:00
Howard Hinnant
575e4e3650
Richard Smith: It was pointed out to me off-list that libc++'s non-compiler-builtin
...
implementation of std::is_polymorphic does this:
template <class _Tp> struct __is_polymorphic1 : public _Tp {};
... and that g++ rejects this if _Tp has an inaccessible virtual destructor
(because __is_polymorphic1<_Tp> would have a deleted virtual destructor
overriding _Tp's non-deleted destructor). Clang was failing to reject this;
I've fixed that in r178563, but that causes libc++'s corresponding test
case to fail with both clang and gcc when using the fallback
implementation. The fallback code also incorrectly rejects final types.
The attached patch fixes the fallback implementation of is_polymorphic; we
now use dynamic_cast's detection of polymorphic class types rather than
trying to determine if adding a virtual function makes the type larger:
enable_if<sizeof((_Tp*)dynamic_cast<const volatile
void*>(declval<_Tp*>())) != 0, ...>
Two things of note here:
* the (_Tp*) cast is necessary to work around bugs in Clang and g++ where
we otherwise don't instantiate the dynamic_cast (filed as PR15656)
* the 'const volatile' is here to treat is_polymorphic<cv T> as true for a
polymorphic class type T -- my reading of the standard suggests this is
incorrect, but it matches our builtin __is_polymorphic and gcc
llvm-svn: 178576
2013-04-02 21:25:06 +00:00
Howard Hinnant
9cb970074f
Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624 .
...
llvm-svn: 178354
2013-03-29 18:27:28 +00:00
Howard Hinnant
b3adefc34c
Second try at r178075. The llvm breakage has been fixed by r178240.
...
llvm-svn: 178253
2013-03-28 17:44:32 +00:00
Howard Hinnant
a4d35ce2bf
Add missing #ifndef _LIBCPP_NO_EXCEPTIONS around throw in include/thread.
...
llvm-svn: 178237
2013-03-28 15:00:04 +00:00
Daniel Dunbar
15eaebea15
Revert r178075, "Tighten up the iterator requirements ...", it breaks LLVM
...
bootstrap with libc++.
llvm-svn: 178116
2013-03-27 04:10:25 +00:00
Howard Hinnant
5a13d8dcea
Tighten up the iterator requirements for the vector member templates. This is especially important for the constructors so that is_constructible<vector<T>, I, I> gives the right answer when T can not be constructed from *I. Test case included for this latter point.
...
llvm-svn: 178075
2013-03-26 21:40:54 +00:00
Howard Hinnant
cd4a9fd301
Another vector debug mode test, and a static test on Allocator::value_type. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=15576 .
...
llvm-svn: 178064
2013-03-26 19:04:56 +00:00
Howard Hinnant
d9db9f90fb
Need one more swap overload for swapping two lvalue vector<bool>::reference's.
...
llvm-svn: 178016
2013-03-26 13:48:57 +00:00
Howard Hinnant
ea1bbbd135
Added debug tests for indexing, pop_back and both forms of erase. Added an improved error message for erasing a single element with end().
...
llvm-svn: 177929
2013-03-25 22:12:26 +00:00
Howard Hinnant
92bd7c0337
Debug mode: learning to crawl. I need to set up some tests that actually test that the debug mode is working, but that won't cause problems when debug mode isn't on. This is my first prototype of such a test. It should call std::terminate() because it's comparing iterators from different containers. And std::terminate() is rigged up to exit normally. If debug mode fails, and doesn't call terminate, then the program asserts. The test is a no-op if _LIBCPP_DEBUG2 is not defined or is defined to be 0.
...
llvm-svn: 177892
2013-03-25 19:29:35 +00:00
Marshall Clow
c962cdf8a5
Fix buffer read overflow in money_get::do_get(). Found by UBSan
...
llvm-svn: 177694
2013-03-22 02:14:40 +00:00