Howard Hinnant
36ba399a33
Correct logic bug in find optimization for vector<bool>. This fixes http://llvm.org/bugs/show_bug.cgi?id=16816
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 20:42:16 +00:00
Howard Hinnant
ab61b2c9f1
War on tabs
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187906 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 19:39:48 +00:00
Marshall Clow
5a11f94583
Implement NULL iterators for <forward_list> and <deque> re: N3644
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187805 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-06 16:14:36 +00:00
Marshall Clow
65d2e6a392
Implement NULL iterators for <list> re: N3644
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187740 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-05 21:23:28 +00:00
Howard Hinnant
824c19963e
debug mode for unordered_map. Also picked up a missing check and test in unordered_multimap. This wraps up debug mode for the unordered containers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187659 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 17:50:49 +00:00
Howard Hinnant
8b00e6c960
Ok, 3 major changes for debug mode in one commit:
...
1. I had been detecting and trapping iterator == and \!= among iterators
in different containers as an error. But the trapping itself is actually
an error.
Consider:
#include <iostream>
#include <vector>
#include <algorithm>
template <class C>
void
display(const C& c)
{
std::cout << "{";
bool first = true;
for (const auto& x : c)
{
if (\!first)
std::cout << ", ";
first = false;
std::cout << x;
}
std::cout << "}\n";
}
int
main()
{
typedef std::vector<int> V;
V v1 = {1, 3, 5};
V v2 = {2, 4, 6};
display(v1);
display(v2);
V::iterator i = std::find(v1.begin(), v1.end(), 1);
V::iterator j = std::find(v2.begin(), v2.end(), 2);
if (*i == *j)
i = j; // perfectly legal
// ...
if (i \!= j) // the only way to check
v2.push_back(*i);
display(v1);
display(v2);
}
It is legal to assign an iterator from one container to another of the
same type. This is required to work. One might want to test whether or
not such an assignment had been made. The way one performs such a check
is using the iterator's ==, \!= operator. This is a logical and necessary
function and does not constitute an error.
2. I had a header circular dependence bug when _LIBCPP_DEBUG2 is defined.
This caused a problem in several of the libc++ tests.
Fixed.
3. There is a serious problem when _LIBCPP_DEBUG2=1 at the moment in that
std::basic_string is inoperable. std::basic_string uses __wrap_iterator
to implement its iterators. __wrap_iterator has been rigged up in debug
mode to support vector. But string hasn't been rigged up yet. This means
that one gets false positives when using std::string in debug mode. I've
upped std::string's priority in www/debug_mode.html.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-02 00:26:35 +00:00
Howard Hinnant
e9df0a5c6c
Nico Rieck: Currently _MSC_VER and _WIN32 are used to guard code which is
...
MSVC-specific, MSVCRT-specific, or Windows-specific. Because Clang can
also define _MSC_VER, and MSVCRT is not necessarily the only C runtime,
these macros should not be used interchangeably.
This patch divides all Windows-related bits into the aforementioned
categories. Two new macros are introduced:
- _LIBCPP_MSVC: Defined when compiling with MSVC. Detected using
_MSC_VER, excluding Clang.
- _LIBCPP_MSVCRT: Defined when using the Microsoft CRT. This is the default
when _WIN32 is defined.
This leaves _WIN32 for code using the Windows API.
This also corrects the spelling of _LIBCP_HAS_IS_BASE_OF to _LIBCPP_HAS_IS_BASE_OF.
Nico, please prepare a patch for CREDITS.TXT, thanks.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 18:17:34 +00:00
Howard Hinnant
56dcf0b809
Taking another swing at correctly optimizing fill_n.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187587 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 17:29:28 +00:00
Howard Hinnant
eb34122153
Constrain fill_n -> memset operations to include implicit convertibility to unsigned char. This fixes http://llvm.org/bugs/show_bug.cgi?id=16764 . Also a drive-by fix on a chrono test suite bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187552 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-01 00:41:55 +00:00
Marshall Clow
a61e6f8705
Implement constexpr (n3302) and fix operator *= and /=
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187529 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 21:02:34 +00:00
Marshall Clow
0777473911
Backwards!
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187518 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 19:39:37 +00:00
Marshall Clow
832b304076
Implement n3469 - constexpr for chrono
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187517 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-31 19:32:19 +00:00
Howard Hinnant
f890d9bfaa
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).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187446 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-30 21:04:42 +00:00
Howard Hinnant
0bb0a7c9ea
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187369 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 19:05:47 +00:00
Marshall Clow
ff46409221
Implement N3421; comparison predicates<void>
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187357 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-29 14:21:53 +00:00
Marshall Clow
f182038521
literal suffixes for std::chrono
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@187078 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-24 21:18:14 +00:00
Howard Hinnant
39213641f4
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).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186991 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 22:01:58 +00:00
Marshall Clow
152343260f
Implement string suffixes from N3642
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186956 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 17:05:24 +00:00
Howard Hinnant
cd59accbf5
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"
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186954 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 16:18:04 +00:00
Richard Smith
01fbfc2fa6
Add some missing cv-qualifiers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186909 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-23 01:24:30 +00:00
Anders Carlsson
b8e0d9086e
Fix a bug in std::fill_n where memset would end up being called in cases when it shouldn’t.
...
Reviewed by Howard.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186875 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-22 21:08:00 +00:00
Marshall Clow
da0a0e8a1b
Make tuple's constructor and std::get<>(tuple) constexpr. Final stage of fixing bug #16599 . Thanks to Howard for the review and updates.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186834 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-22 16:02:19 +00:00
Marshall Clow
8fc4f5a251
Make std::get constexpr
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186525 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-17 18:25:36 +00:00
Marshall Clow
206f6cdc33
Bug 16599 part 2: Make std::pair's constructors and comparison operators (and make_pair) constexpr.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186430 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-16 17:45:44 +00:00
Marshall Clow
01a0e90783
Make std::forward and std::move (and std::move_if_noexcept) constexpr in C++14
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186344 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 20:46:11 +00:00
Howard Hinnant
1e1d05121d
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186335 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 18:21:11 +00:00
Marshall Clow
ac93d0ebf2
Add macro _LIBCPP_CONSTEXPR_AFTER_CXX11 for functions that have been marked constexpr post C++11
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186323 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-15 14:57:19 +00:00
Marshall Clow
e8029e54f1
Implement n3584 - Addressing Tuples by Type
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-13 02:54:05 +00:00
Howard Hinnant
e840208989
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@186089 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-11 15:32:55 +00:00
Marshall Clow
809e93f7f2
move __save_flags from <random> to <ios> in preparation for reuse; no functionality change
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185968 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-09 20:34:14 +00:00
Howard Hinnant
7670f7d1ed
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185950 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-09 17:29:09 +00:00
Howard Hinnant
171771a9f5
War on tabs.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185865 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 21:06:38 +00:00
Marshall Clow
e2735d1df0
Implement n3668 - std::exchange
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185863 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 20:54:40 +00:00
Marshall Clow
d29bb4b7c4
Implement n3545 for c++14
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185856 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-08 20:05:31 +00:00
Howard Hinnant
9b128e06ed
Remove implicit conversion from __value_type to value_type in [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16549
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-05 18:06:00 +00:00
Howard Hinnant
b66e1c3f96
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185666 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 20:59:16 +00:00
Howard Hinnant
e008d4eecc
Simplify comparators of [unordered_][multi]map. This fixes http://llvm.org/bugs/show_bug.cgi?id=16538
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185665 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 19:46:35 +00:00
Marshall Clow
933afa9761
Patch for N3655 (Transformation type traits) with Howard's additions
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185597 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-04 00:10:01 +00:00
Marshall Clow
42e55e932e
Commit patch for integer sequences. Suggested by Richard, reworked by Howard, and annotated by me
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-03 19:20:30 +00:00
Howard Hinnant
24ae8f8e5b
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185558 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-03 17:39:28 +00:00
Marshall Clow
fb5511027b
Adorn make_unique with visibility and inline attributes
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185468 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 20:06:09 +00:00
Howard Hinnant
839ae58c2e
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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185457 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 18:42:28 +00:00
Howard Hinnant
6a683bfb5f
Constrain launch ~ operator to defined bits.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185452 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 18:01:41 +00:00
Howard Hinnant
dbc8cf059e
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/.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-02 17:43:31 +00:00
Marshall Clow
fd7481e96d
Implement n3656 - make_unique. Thanks to Howard for the review and suggestions.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185352 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-01 18:16:03 +00:00
Marshall Clow
7ec46bc422
Implement n3658 - Compile-time integer sequences
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185343 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-01 16:26:55 +00:00
Howard Hinnant
11b87182b0
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185298 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-01 00:37:50 +00:00
Howard Hinnant
099dec1ba0
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-01 00:01:51 +00:00
Howard Hinnant
c05e98660f
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185289 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-30 19:48:15 +00:00
Howard Hinnant
a9602d56de
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185273 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-29 23:45:43 +00:00
Howard Hinnant
f491e51ebd
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185265 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-29 18:38:17 +00:00
Howard Hinnant
ab135d7f4e
Make cout a little more thread-safe. This fixes http://llvm.org/bugs/show_bug.cgi?id=12158
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185222 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 21:40:28 +00:00
Howard Hinnant
c1ecd97f00
Provide missing '{' in parsing extended quoted characters. This fixes http://llvm.org/bugs/show_bug.cgi?id=16135
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185211 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 20:31:05 +00:00
Howard Hinnant
e57b7c445b
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185196 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 19:11:23 +00:00
Howard Hinnant
918f2a80ab
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185192 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 18:57:30 +00:00
Howard Hinnant
b9d9fb4a17
Dimitry Andric: Add const to constexpr member functions in order to cope with new C++1y language rules. This silences -Wconstexpr-not-const warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185181 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 18:09:35 +00:00
Howard Hinnant
9dcdcdee25
Implement full support for non-pointer pointers in custom allocators for string. This completes the custom pointer support for the entire library.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185167 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-28 16:59:19 +00:00
Howard Hinnant
2c39cbe020
Implement full support for non-pointer pointers in custom allocators for vector.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@185093 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-27 19:35:32 +00:00
Howard Hinnant
29f7432ff3
Implement full support for non-pointer pointers in custom allocators for list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184859 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 16:08:47 +00:00
Howard Hinnant
81381a932f
Implement full support for non-pointer pointers in custom allocators for forward_list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184759 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 17:17:28 +00:00
Dmitri Gribenko
c7a39cf584
Fix typo in assertion message. Reported by Shriramana Sharma.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184691 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 06:15:57 +00:00
Howard Hinnant
fcd8db7133
Implement full support for non-pointer pointers in custom allocators for deque.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184673 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-23 21:17:24 +00:00
Howard Hinnant
7a6b7cedcb
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184635 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-22 15:21:29 +00:00
Howard Hinnant
70342b99e2
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@184358 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-19 21:29:40 +00:00
Howard Hinnant
9360e9f944
Minor bug fix for allowing an extension of const-qualified types in containers.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@183481 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-07 01:56:37 +00:00
Howard Hinnant
ddb4e4cbb1
Neglected to remove a debugging comment from last commit.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182422 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 21:19:35 +00:00
Howard Hinnant
8f72d5ce16
Fix a couple of bugs in linear_congruential_engine::seed. Regression test added.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182421 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21 21:05:12 +00:00
Joerg Sonnenberger
a71a952634
Add NetBSD support.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182162 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-17 21:17:34 +00:00
Howard Hinnant
9e98b34a8c
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@182026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-16 17:13:40 +00:00
Howard Hinnant
6287c65a03
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181935 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 21:49:27 +00:00
David Blaikie
e27e907403
Fixing the MSan/compiler-rt build
...
Patch by Evgieniy Stepanov, review by İsmail Dönmez.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181740 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-13 21:53:44 +00:00
Howard Hinnant
b3585e8226
İsmail Dönmez: Enable quick_exit on linux.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181612 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-10 17:36:59 +00:00
Marshall Clow
9f8f524541
Fix incorrect type usage; nice catch by Sebastian
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181569 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-10 00:16:10 +00:00
Marshall Clow
b30abdd07a
Implement n3607: 'equal', 'mismatch', and 'is_permutation'
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181548 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-09 21:14:23 +00:00
Howard Hinnant
a7f5c1bcd8
Put a 1-character unget buffer into cin. This fixes http://llvm.org/bugs/show_bug.cgi?id=15867
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181470 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-08 21:18:42 +00:00
Howard Hinnant
ecc9742f27
Constrain __invoke functions more accurately. This fixes http://llvm.org/bugs/show_bug.cgi?id=15861 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181377 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07 23:40:12 +00:00
Howard Hinnant
5f1286f574
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181347 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-07 20:16:13 +00:00
Howard Hinnant
8c23819220
Expose accidentally removed __compressed_pair constructor taking piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@181217 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 16:58:36 +00:00
Howard Hinnant
74f4da7219
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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180945 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-02 20:18:43 +00:00
Howard Hinnant
15467189c3
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180811 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30 21:44:48 +00:00
Joerg Sonnenberger
155f06018e
Use protected version of the malloc attribute in case source wants to
...
define malloc as macro.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180727 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-29 19:52:08 +00:00
Joerg Sonnenberger
a9b94f1337
GCC doesn't support __has_attribute.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180683 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27 20:51:42 +00:00
Howard Hinnant
05e7d24b3d
default_delete needs a static_assert against void types. I had previously thought that sizeof(void) would take care of this. I was wrong.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180213 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-24 19:44:26 +00:00
Howard Hinnant
08dd25303e
Modest performance improvement for std::string's operator==.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180072 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22 23:55:13 +00:00
Howard Hinnant
5544f7e0c7
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@180036 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22 19:37:49 +00:00
Howard Hinnant
b4e67cfd42
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179760 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18 15:02:57 +00:00
Howard Hinnant
4313ec3975
addressof misbehaving for type with an implicit conversion operator to char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179608 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16 17:27:56 +00:00
Howard Hinnant
ae57a1ab1d
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
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179556 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-15 20:40:06 +00:00
Howard Hinnant
993248935c
Accidentally disallowed explicit tuple conversions when all elements of the tuple can be explicitly converted.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179467 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-14 00:01:13 +00:00
Howard Hinnant
4f67100219
Set failbit when strtold sets errno to ERANGE when parsing floating point values.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-13 18:19:25 +00:00
Howard Hinnant
a5733b3ad3
Ruben Van Boxem: Turn islower_l and isupper_l into functions (instead of macros) on Windows only to quell a warning during libc++ building.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179408 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 20:22:57 +00:00
Howard Hinnant
0795931dee
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@179041 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08 18:59:28 +00:00
Howard Hinnant
6dcaf3ee1a
Fix bug in __libcpp_db::__iterator_copy. Add debug test for swaping lists.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 17:58:52 +00:00
Howard Hinnant
79a35570a5
More work on debug mode for list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178819 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05 00:18:49 +00:00
Howard Hinnant
128f7bf4fa
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 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178764 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-04 15:40:48 +00:00
Howard Hinnant
c5e8961a35
Fix stupid but harmless type-o. Fixes http://llvm.org/bugs/show_bug.cgi?id=15657 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178691 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03 20:29:45 +00:00
Howard Hinnant
4aa8b06e67
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 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178690 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-03 20:21:29 +00:00
Howard Hinnant
cf31d3864e
Reference: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130325/077133.html
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178581 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 22:14:51 +00:00
Howard Hinnant
11a50ac497
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
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178576 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-02 21:25:06 +00:00
Howard Hinnant
fc2f021bdd
Bruce Mitchener, Jr.: Port to emscripten. Fixes http://llvm.org/bugs/show_bug.cgi?id=15624 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178354 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-29 18:27:28 +00:00
Howard Hinnant
742fecbd2a
Second try at r178075. The llvm breakage has been fixed by r178240.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178253 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28 17:44:32 +00:00
Howard Hinnant
2c0d3edf68
Add missing #ifndef _LIBCPP_NO_EXCEPTIONS around throw in include/thread.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-28 15:00:04 +00:00
Daniel Dunbar
34d36f39b0
Revert r178075, "Tighten up the iterator requirements ...", it breaks LLVM
...
bootstrap with libc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178116 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 04:10:25 +00:00
Howard Hinnant
32d40f5f44
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178075 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 21:40:54 +00:00
Howard Hinnant
02d5e18917
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 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178064 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 19:04:56 +00:00
Howard Hinnant
d9cdb2dcfd
Need one more swap overload for swapping two lvalue vector<bool>::reference's.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@178016 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 13:48:57 +00:00
Howard Hinnant
782da33d1c
Added debug tests for indexing, pop_back and both forms of erase. Added an improved error message for erasing a single element with end().
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177929 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 22:12:26 +00:00
Howard Hinnant
f5f4684e71
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.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177892 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-25 19:29:35 +00:00
Marshall Clow
9b145da078
Fix buffer read overflow in money_get::do_get(). Found by UBSan
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177694 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 02:14:40 +00:00
Marshall Clow
04bd79b23a
Fix undefined behavior in syntax_option_type::operator~ and match_flag_type::operator./a.out Found by UBSan
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177693 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-22 02:13:55 +00:00
Howard Hinnant
903439f735
This is an optimization which produces improved launching time. There should be no functionality change. Clients should see no ABI differences.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177443 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-19 21:34:48 +00:00
Marshall Clow
53e2763966
Removed raw references to __sun__, __FreeBSD__, __GLIBC__ and __linux__; now just check to see if they are defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177310 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 19:34:07 +00:00
Marshall Clow
dab9b2eb32
Removed raw references to _MSC_VER; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177304 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 18:20:48 +00:00
Marshall Clow
dece7fe670
Removed raw references to __APPLE__; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177297 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:45:34 +00:00
Marshall Clow
a22d2addb1
Removed raw references to _WIN32; now just check to see if it is defined.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@177291 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-18 17:04:29 +00:00
Howard Hinnant
c789025a5a
This SO question: http://stackoverflow.com/questions/15344402/how-can-i-read-a-0xff-in-a-file-with-libc-istream-iterator/15347225#15347225 highlighted the lack of a cast in the implementation of std::cin. Added. I unfortunately don't have a test case to add to the suite since this bug only shows itself when using std::cin. The current testsuite setup does not have a way a good way to test std::cin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176822 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-11 19:53:48 +00:00
Howard Hinnant
6319f1462d
Parsing floating point numbers with very long precision was broken, and this patch fixes it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15445 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-08 19:06:24 +00:00
Howard Hinnant
23fb972520
Albert Wong: definition for regex_traits<_CharT>::__regex_word.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176640 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 19:38:08 +00:00
Howard Hinnant
707f318787
Change _LIBCPP_TYPE_VIS to use __type_visibility__(default) instead of __visibility__(default) when available. This change makes just the type_info visible so that types like vectors and strings can be used as exception objects across dylib boundaries even when hidden visibility is specified globally (at the command line), and yet this allows clients to hide the member functions of things like vector and string (with global visibility commands).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176639 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-07 19:25:03 +00:00
Howard Hinnant
83eade6abb
No functionality change at this time. I've split _LIBCPP_VISIBLE up into two flags: _LIBCPP_TYPE_VIS and _LIBCPP_FUNC_VIS. This is in preparation for taking advantage of clang's new __type_visibility__ attribute.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176593 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 23:30:19 +00:00
Howard Hinnant
cc7bdae931
Have basic_istream::read call sgetn intead of sbumpc individual characters. This addresses http://llvm.org/bugs/show_bug.cgi?id=15427 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176573 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 19:27:56 +00:00
Howard Hinnant
3101474720
Correct silly type-o. Thanks Richard.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176568 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 18:16:12 +00:00
Howard Hinnant
11a31d0583
The bitset(unsigned long long) constructor was broken by the constexpr additions only on 32 bit platforms. Fixed. This addresses http://llvm.org/bugs/show_bug.cgi?id=15444 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-06 17:30:26 +00:00
Howard Hinnant
4a0e74fff8
Alexey Samsonov: #ifdefs out undefined function in static build of libc++ w/o RTTI.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@176026 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-25 15:50:36 +00:00
Howard Hinnant
0560f786fe
Constrain bind operator()() to not exist if the call is not valid. Fixes http://llvm.org/bugs/show_bug.cgi?id=15295 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@175774 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-21 18:16:55 +00:00
Marshall Clow
5920cfc403
Change the 'result_type' from unsigned to 'uint_fast32_t'. This eliminates truncation warnings on Linux
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174669 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 22:12:02 +00:00
Howard Hinnant
635bbbb6d1
Revert accidental check-in. These changes are probably good, but premature at this point.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174625 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 15:31:44 +00:00
Howard Hinnant
46c49d19aa
Michael van der Westhuizen: The attached patch add support for building against libc++abi and libcxxrt to CMake builds of libc++.
...
Usage (with the appropriate CC and CXX environment variables) is:
$ cmake -DLIBCXX_CXX_ABI=libcxxabi '-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=/home/michael/libcxxabi/include' ../libcxx
and:
$ cmake -DLIBCXX_CXX_ABI=libcxxrt '-DLIBCXX_LIBCXXRT_INCLUDE_PATHS=/home/michael/libcxxrt/src' ../libcxx
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174623 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-07 15:27:39 +00:00
Howard Hinnant
b73568dc24
Marcin Zalewski: Change the name of a template parameter in __copy_backward from _InputIterator to _BidirectionalIterator to better document the intent of the algorithm.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@174544 91177308-0d34-0410-b5e6-96231b3b80d8
2013-02-06 21:03:39 +00:00
Howard Hinnant
54e2fff2e1
Saleem Abdulrasool: If errno is defined as volatile int, the qualifier differences can cause
...
template typename deductions on swap<> (used in string.cpp). Use
decltype(errno) to replicate the type and qualifier information for holding the
errno value. Because errno is expected to be assignable, there is no need to
use typename std::remove_const<decltype(errno)>::type to hold the value.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173172 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-22 17:26:08 +00:00
Howard Hinnant
7b9d6a8d40
Implement the ATOMIC_*_LOCK_FREE macros.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173084 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-21 20:39:41 +00:00
Howard Hinnant
78f0de22db
Donated anonymously: This enables GCC 4.8.0 to build libc++.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@173060 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-21 17:26:55 +00:00
Howard Hinnant
0b93963db7
Optimize basic_ostream::write by having it call sputn instead of sputc.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172542 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-15 17:22:03 +00:00
Howard Hinnant
b05a55675f
Make <cmath> classification macros work with integral types.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 20:56:22 +00:00
Howard Hinnant
1b031c947f
Fix a race in the construction of future. This fixes http://llvm.org/bugs/show_bug.cgi?id=14934 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172456 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 20:01:24 +00:00
Howard Hinnant
750039f50c
Michael van der Westhuizen: Patches for Linux. Fixes http://llvm.org/bugs/show_bug.cgi?id=14648 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-14 17:07:27 +00:00
Howard Hinnant
f619e230cc
Fix exception safety bug in vector::push_back
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@172250 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-11 20:36:59 +00:00
Howard Hinnant
6ae47055f9
atomic_bool was missing (just a typedef to atomic<bool>).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171498 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-04 18:58:50 +00:00
Howard Hinnant
352bd3a273
Klaas de Vries: Fix bug in libc++'s std::string::find_first_not_of.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171321 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 20:09:48 +00:00
Chandler Carruth
ed9f69d342
Don't mark variadic functions as always inline -- they cannot in fact be
...
inlined.
Patch by Saleem Abdulrasool, reviewed by Michael Spencer and Richard Smith.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171276 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-31 06:09:54 +00:00
Howard Hinnant
d1a7479763
Remove test for eof from istreambuf_iterator constructors. It is no longer necessary and potentially violates the constructor's noexcept spec.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@171232 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-29 17:45:42 +00:00
Howard Hinnant
ee717d8c44
Hyeon-Bin Jeong: readsome() need to reset gcount to zero. This fixes http://llvm.org/bugs/show_bug.cgi?id=14670 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170703 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20 15:40:28 +00:00
Richard Smith
b2f2b68143
Implement std::is_base_of for the case where we don't have a compiler
...
intrinsic. This relies upon the fact that overload resolution does not check
access and ambiguity for a derived-to-base conversion. This passes all
is_base_of tests in the test suite.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170662 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-20 04:20:28 +00:00
Marshall Clow
a46482e8bb
Added static_assert to std::get<N>(std::array) calls to catch "out of bounds" calls
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170435 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-18 16:46:30 +00:00
Howard Hinnant
0a69fa14d2
Zhang Xiongpang: Add definitions for const data members. Fixes http://llvm.org/bugs/show_bug.cgi?id=14585 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@170026 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-12 21:14:28 +00:00
Richard Smith
53008d8b0c
Remove 'noreturn' attribute from friend declaration. This attribute will be
...
inherited from the previous out-of-class declaration, and attributes on friend
function declarations are ill-formed in C++11.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168853 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-29 04:30:50 +00:00
Howard Hinnant
8a9c5ea750
Dimitry Andric: When using libc++ headers on FreeBSD, in combination with -std=c++98,
...
-ansi or -std=c++03, the long long type is not supported. So in this
case, several functions and types, like lldiv_t, strtoll(), are not
declared.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168610 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-26 21:18:17 +00:00
Howard Hinnant
984f10fdc0
istreambuf_iterator increment should call sbumpc instead of snextc. Patch
...
by Kimball Thurston. This fixes http://llvm.org/bugs/show_bug.cgi?id=14358 .
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@168209 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-16 22:17:23 +00:00
Howard Hinnant
537b2fa6b8
Restrict optimized __pad_and_output implementation detail to desired releases.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167980 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-14 21:17:15 +00:00
Howard Hinnant
0919dbaab3
Dimitry Andric: Silence some miscellaneous warnings.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167493 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 21:55:44 +00:00
Howard Hinnant
9bae2a9dc5
Dimitry Andric: Silence some warnings in <locale>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 21:48:33 +00:00
Howard Hinnant
9d5e9d3d66
Enable the tuple interface of pair in C++03 mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167491 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 21:42:45 +00:00
Howard Hinnant
ff9267709d
Provide a way to disable use of extern templates in libc++. This is intended for the clients of libc++, not the libc++ build. The dylib should always contain the extern templates. To disable the client needs to put -D'_LIBCPP_EXTERN_TEMPLATE(...)=' on the command line.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167486 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-06 21:08:48 +00:00
Howard Hinnant
73c85c7725
peek should set eofbit if sgetc() returns eof.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167238 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-01 17:32:07 +00:00
Howard Hinnant
4af2cf38f0
Richard Smith: This fixes a problem in std::is_constructible for incomplete types, and those types with a user-defined operator,().
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167233 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-01 16:32:14 +00:00
Howard Hinnant
9c0df1416f
Rename uses of _ and __ because these are getting stepped on by macros from other system code.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@167038 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 19:06:59 +00:00
Howard Hinnant
1c0be3864a
Use traits_type::to_int_type in basic_streambuf<_CharT, _Traits>::xsputn when calling overflow to correctly handle negative signed character types. This fixes http://llvm.org/bugs/show_bug.cgi?id=14074 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@165884 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-13 19:31:51 +00:00
Howard Hinnant
999fc97ef2
Dimitry Andric: FreeBSD only: Add the C11 aligned_alloc to <cstdlib> and adjust the inclusion of quick_exit.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@165882 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-13 18:03:53 +00:00
Argyrios Kyrtzidis
1dc6f7ab97
Don't neglect to "return *this".
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@165860 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-13 02:03:45 +00:00
Howard Hinnant
75536baae7
Holger Arnold: Correct the use and testing of __GNUC__ and __GNUC_MINOR__ in <__config>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@165151 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 20:48:05 +00:00
Howard Hinnant
95c0e9f9e1
Make vector::iterator and string::iterator more resilient against overly generic relational operators.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@165033 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02 19:45:42 +00:00
Howard Hinnant
155ff6e95a
Due to a mistake on my own part, I need to burn some version numbers. This does not impact any of the implementation of libc++, and does not impact the ABI in any way.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@164832 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-28 17:42:25 +00:00
Howard Hinnant
8d36c432f2
Bump _LIBCPP_VERSION to 1002
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@164700 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-26 15:38:09 +00:00
Howard Hinnant
c25d158c62
Apply the emulated nullptr_t with constexpr. This is an unusual configuration that would take advantage of this. But it has popped up in the wild and does no harm to support it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@164575 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-24 23:36:40 +00:00
Howard Hinnant
2d3f4ee99f
Add overflow check to tanh(complex) and reduce to finite answer. Fixes http://llvm.org/bugs/show_bug.cgi?id=13874
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@164266 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-19 23:51:47 +00:00
Howard Hinnant
a585de645c
Overloaded __pad_and_output on ostreambuf_iterator and in this overload call sputn instead of dereferencing the iterator which calls sputc. This is intended to be purely a performance optimization, especially for clients who may have overloaded the virtual function xsputn.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@164241 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-19 19:14:15 +00:00
Howard Hinnant
7eb9f1e3a3
Align <atomic> with clang r163964 which disallows const _Atomic types.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@164004 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-16 20:33:09 +00:00
Howard Hinnant
33be35effe
Dimitry Andric: many visibility fixes. Howard: Much appreciated. Can you send me a patch to CREDITS.TXT?
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@163862 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-14 00:39:16 +00:00
Howard Hinnant
5c90cbad38
Dimitry Andric: FreeBSD porting tweaks for PTHREAD_MUTEX_INITIALIZER and PTHREAD_COND_INITIALIZER
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@163626 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-11 16:10:20 +00:00
Howard Hinnant
460b4cadde
Some minor mingw64 porting tweaks from Glen.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@163120 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-03 18:13:11 +00:00
Howard Hinnant
cf115d2cc6
Change sleep_for, sleep_until, and the condition_variable timed wait
...
functions to protect against duration and time_point overflow. Since
we're about to wait anyway, we can afford to spend a few more cycles on
this checking. I purposefully did not treat the timed try_locks with
overflow checking. This fixes
http://llvm.org/bugs/show_bug.cgi?id=13721 . I'm unsure if the standard
needs clarification in this area, or if this is simply QOI. The
<chrono> facilities were never intended to overflow check, but just to
not overflow if durations stayed within +/- 292 years.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162925 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-30 19:14:33 +00:00
Howard Hinnant
c417a802ed
Hyeon-bin Jeong: libc++ fails to create any classes inherit from basic_ios if they
...
provided char type other than char or wchar_t. It throw exception during
construction, so there is no chance to imbue own ctype.
This fixes http://llvm.org/bugs/show_bug.cgi?id=13698
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162648 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-26 18:05:35 +00:00
Howard Hinnant
a5160283a4
Michel Morin: My previous fix for C++03 was incomplete.
...
It does not consider user-defined conversions that convert an rvalue
into an lvalue and works incorrectly for types with such a conversion
operator.
For example,
struct foo
{
operator int&();
};
returns false_type.
Attached a patch that fixes this problem.
http://llvm.org/bugs/show_bug.cgi?id=13601
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162644 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-25 15:06:50 +00:00
Howard Hinnant
37bdf0e6bd
Have basic_istream seekg, putback and unget first clear eofbit. Fixes http://llvm.org/bugs/show_bug.cgi?id=13089 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162608 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24 22:03:03 +00:00
Howard Hinnant
d305d3c1a2
Hyeon-Bin Jeong: 1. sync() should reset it’s external buffer pointers.
...
Remaining characters should be discarded once sync() called. If don’t, garbage
characters can be inserted to the front of external buffer in underflow().
Because underflow() copies remaining characters in external buffer to it’s
front. This results wrong characters insertion when seekpos() or seekoff() is
called.
this line should be inserted in sync() just before return:
__extbufnext_ = __extbufend_ = __extbuf_;
2. sync() should use length() rather than out() to calculate offset.
Reversing iterators and calling out() to calculate offset from behind is
working fine in stateless character encoding. However, in stateful encoding,
escape sequences could differ in length. As a result, out() could return wrong
length.
For example, if we have internal buffer converted from this external sequence:
(capital letters mean escape sequence)
… a a a a B b b b b
out() produces this sequence.
b b b b A a a a a
Because out() inserts escape sequence A rather than B, result sequence doesn't
match to external sequence. A and B could have different lengths, result offset
could be wrong value too.
length() method in codecvt is right for calculating offset, but it counts
offset from the beginning of buffer. So it requires another state member
variable to hold state before conversion.
Fixes http://llvm.org/bugs/show_bug.cgi?id=13667
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162601 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24 21:20:56 +00:00
Howard Hinnant
ec423cb8d4
Fix basic_filebuf's internal buffer is shrinking when using with some codecvt. http://llvm.org/bugs/show_bug.cgi?id=13602
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162585 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24 20:37:00 +00:00
Howard Hinnant
e7d59f2601
Fixed order of calling use_facet vs setbuf in basic_filebuf default constructor.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162571 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24 18:06:47 +00:00
Howard Hinnant
8540d4c9d2
basic_filebuf needs to delay obtaining a codecvt facet from the global locale to give the client a chance to imbue the proper locale. Fixes http://llvm.org/bugs/show_bug.cgi?id=13663 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162567 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-24 16:52:47 +00:00
Howard Hinnant
ffab05833f
In C++03 mode add an explicit conversion from int to the emulated class enum. Fixes a problem reported by C. Bergström.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162189 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-19 17:14:47 +00:00
Howard Hinnant
96c60b482e
Patch contributed by Dev Dude for mingw64 port.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162188 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-19 15:13:16 +00:00
Howard Hinnant
a0852ffbe8
Apply patches supplied by Michel Morin in http://llvm.org/bugs/show_bug.cgi?id=13601 to correct bugs in is_convertible for the case that the intrinsic __is_convertible_to is not available.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162111 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17 17:54:11 +00:00
Howard Hinnant
4ae952ab9a
Consistently label __bit_array as a struct, not a class.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@162108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-17 17:10:18 +00:00
Howard Hinnant
e87514aa94
Patch constributed by Michel Moren in http://llvm.org/bugs/show_bug.cgi?id=13592 . Fixes is_convertible<From, To> when To is an abstract type.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161755 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-13 12:29:17 +00:00
Howard Hinnant
584db4287b
std::equal operating on non-const __bit_iterators was not working. This fixes it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161309 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-05 21:43:11 +00:00
Howard Hinnant
4b2f4203a2
Performance tweaking rotate.
...
rotate is a critical algorithm because it is often used by other algorithms,
both std and non-std. The main thrust of this optimization is a specialized
algorithm when the 'distance' to be shifted is 1 (either left or right). To my
surprise, this 'optimization' was not effective for types like std::string.
std::string favors rotate algorithms which only use swap. But for types like
scalars, and especially when the sequence is random access, these new
specializations are a big win. If it is a vector<size_t> for example, the
rotate is done via a memmove and can be several times faster than the gcd
algorithm.
I'm using is_trivially_move_assignable to distinguish between types like int and
types like string. This is obviously an ad-hoc approximation, but I haven't
found a case where it doesn't give good results.
I've used a 'static if' (with is_trivially_move_assignable) in three places.
Testing with both -Os and -O3 showed that clang eliminated all code not be
executed by the 'static if' (including the 'static if' itself).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@161247 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-03 18:01:20 +00:00
Howard Hinnant
5fec82dc0d
Implement [util.smartptr.shared.atomic]. This is the last unimplemented
...
section in libc++. This requires a recompiled dylib. Failure to rebuild
the dylib will result in a link-time error if and only if the functions from
[util.smartptr.shared.atomic] are used.
The implementation is not lock free. After considerable thought, I know of no
way to make the implementation lock free. Ideas welcome along that front. But
changing the ABI of shared_ptr is not on the table at this point.
The mutex used to lock these function is encapsulated by std::__sp_mut. The
only thing the client knows about std::__sp_mut is that it has a void* data
member, can't be constructed, and has lock and unlock members. Within the
binary __sp_mut is currently implemented as a pointer to a std::mutex. That can
change in the future without disturbing the ABI (as long as sizeof(__sp_mut)
remains constant.
I specifically did not make __sp_mut a spin lock as I have a pathological
distrust of spin locks. Testing on OS X reveals that the use of std::mutex in
this role is not a large performance penalty as long as the contention for the
mutex is low (more likely to get the lock than to have to wait). In the future
we can still make __sp_mut a spin lock if that is what is desired (without ABI
damage).
The dylib contains 16 __sp_mut's to be chosen based on the hash of the address
of the shared_ptr. The constant 16 is a ball-park reasonable space/time
tradeoff.
std::hash<T*> was changed to call __murmur2_or_cityhash, instead of the identity
function. I had thought we had already done this, but I was mistaken.
All of this is under #if __has_feature(cxx_atomic) even though the
implementation is not lock free, because the signatures require access to
std::memory_order, which is currently available only under
__has_feature(cxx_atomic).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160940 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-30 01:40:57 +00:00
Howard Hinnant
afcac1ac46
Patch by Andrew C. Morrow: shims to work around macroized getc and putc on linux. On my eglibc 2.13 based Debian system 'getc' is a macro defined in
...
/usr/include/stdio.h. This decision to make it a macro doesn't seem to
be guarded by any feature test macro as far as I can see.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160799 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-26 20:01:13 +00:00
Howard Hinnant
ca8eb830dd
<algorithm> no longer needs to include <cstdlib>, but can get away with just <cstddef>. This was brought to my attention by Salvatore Benedetto in his port to a bare-metal coretex-m3. This exposed two test bugs where an explicit #include <cstdlib> was needed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160786 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-26 17:09:09 +00:00
Howard Hinnant
f3d62ea57f
locale::id really needs to be constructed at compile time.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160785 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-26 16:14:37 +00:00
Richard Smith
0405cc4ae0
libc++: switch from using _ATTRIBUTE(noreturn) (which conflicts with a
...
platform-provided macro on some systems) to _LIBCPP_NORETURN.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160773 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-26 02:04:22 +00:00
Howard Hinnant
8131a01a9c
Apple LWG 2067: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3318.html#2067 . This is the only actionable change that has been made to the C++ draft since C++11. In general it has not been decided exactly how libc++ will track changes made to C++11. New features and design changes will probably be #ifdef'd, especially if they are not backwards compatible. Defects and 'dumb mistakes' are more likely to just be put in. Decisions on telling one from the other will be made on a case by case basis.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160608 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 19:34:12 +00:00
Howard Hinnant
8bf01ddd30
noexcept applied to <future>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160607 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 17:46:55 +00:00
Howard Hinnant
6e1d851be8
noexcept applied to <thread>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160606 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 16:50:47 +00:00
Howard Hinnant
c8f7413908
noexcept applied to <condition_variable>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160605 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 16:32:53 +00:00
Howard Hinnant
499c61f999
noexcept and constexpr applied to <mutex>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160604 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 16:13:09 +00:00
Howard Hinnant
46623a09ee
noexcept and constexpr applied to <regex>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160594 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 01:31:58 +00:00
Howard Hinnant
f57bd564fd
noexcept and constexpr applied to <ios>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160593 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 01:03:40 +00:00
Howard Hinnant
bd143086ac
noexcept applied to <valarray>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160592 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-21 00:51:28 +00:00
Howard Hinnant
410f2def47
constexpr applied to <complex>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160585 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 22:18:27 +00:00
Howard Hinnant
c83960a9e4
noexcept applied to <random>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160579 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 21:44:27 +00:00
Howard Hinnant
d06a640ba7
noexcept applied to <iterator>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160565 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 19:36:34 +00:00
Howard Hinnant
08bce1754d
constexpr applied to <array>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160564 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 19:20:49 +00:00
Howard Hinnant
03d7181b0e
constexpr applied to <string>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160563 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 19:09:12 +00:00
Howard Hinnant
e41f475a44
Further tweaks on relaxing complete type checking for function.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160562 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-20 18:56:07 +00:00
Howard Hinnant
c425307238
Relax the complete-type checks that are happening under __invokable<Fp, Args...> to only check Fp, and not Args... . This should be sufficient to give the desired high quality diagnostics under both bind and function. And this allows a test reported by Rich E on cfe-dev to pass. Tracked by <rdar://problem/11880602>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160285 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-16 16:17:34 +00:00
Howard Hinnant
473f838128
Applied constexpr to <chrono>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160184 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-13 19:17:27 +00:00
Howard Hinnant
1ca23672a0
Fixed a bug in wstring_convert concerning zero-length inputs. Thanks to Jonathan Coxhead for reporting this bug.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@160136 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-12 18:07:41 +00:00
Howard Hinnant
a58402abb9
Change emplace for vector and deque to create the temporary (when necessary) before any changes to the container are made. Nikolay Ivchenkov deserves the credit for pushing this problem and the solution for it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-08 23:23:04 +00:00
Howard Hinnant
46e9493c68
Appy constexpr to <memory>. Picked up a few missing noexcepts as well.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159902 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 20:56:04 +00:00
Howard Hinnant
384608e90d
Apply constexpr to the mutex constructor. As a conforming extension, apply constexpr to the condition_variable constructor. These are important because it enables the compiler to construct these types at compile time, even though the object will be non-const. Since they are constructed at compile time, there is no chance of a data race before they are constructed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159901 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 20:01:52 +00:00
Howard Hinnant
90d8723476
Apply constexpr to <bitset>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159899 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-07 17:04:52 +00:00
Howard Hinnant
74f26f251b
Apply noexcept to tuple.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159865 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 21:53:48 +00:00
Howard Hinnant
4eebfc3394
As a conforming extension give tuple a noexcept default constructor conditionalized on its held types.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159858 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 20:50:27 +00:00
Howard Hinnant
5394c1ed30
Give tuple a constexpr default constructor.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159857 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 20:39:45 +00:00
Howard Hinnant
9b12f23e30
Apply noexcept to those functions implemented in <cstdlib> as a conforming extension.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159850 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 19:16:56 +00:00
Howard Hinnant
cac0c46abb
Apply noexcept to those functions implemented in <cmath> as a conforming extension.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159849 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 19:13:50 +00:00
Howard Hinnant
7a44515588
This commit establishes a new bucket_count policy in the unordered containers: The policy now allows a power-of-2 number of buckets to be requested (and that request honored) by the client. And if the number of buckets is set to a power of 2, then the constraint of the hash to the number of buckets uses & instead of %. If the client does not specify a number of buckets, then the policy remains unchanged: a prime number of buckets is selected. The growth policy is that the number of buckets is roughly doubled when needed. While growing, either the prime, or the power-of-2 strategy will be preserved. There is a small run time cost for putting in this switch. For very cheap hash functions, e.g. identity for int, the cost can be as high as 18%. However with more typical use cases, e.g. strings, the cost is in the noise level. I've measured cases with very cheap hash functions (int) that using a power-of-2 number of buckets can make look up about twice as fast. However I've also noted that a power-of-2 number of buckets is more susceptible to accidental catastrophic collisions. Though I've also noted that accidental catastrophic collisions are also possible when using a prime number of buckets (but seems far less likely). In short, this patch adds an extra tuning knob for those clients trying to get the last bit of performance squeezed out of their hash containers. Casual users of the hash containers will not notice the introduction of this tuning knob. Those clients who swear by power-of-2 hash containers can now opt-in to that strategy. Clients who prefer a prime number of buckets can continue as they have.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159836 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-06 17:31:14 +00:00
Nuno Lopes
518d150040
mark operator new(std::nothrow) as noalias (aka __attribute__((malloc))
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159359 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28 16:47:34 +00:00
Howard Hinnant
2d62229b96
Fixed a bug regarding result_of reported by Sven Behne. The fix is C++11 only mainly because result_of is a variadic beast and working with variadics is just such a problem in C++03 mode. This should bring result_of up to full conformance with the C++11 spec.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159211 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-26 17:37:15 +00:00
Howard Hinnant
fe59276f04
Revert pair constructors back to using is_convertible instead of is_constructible. This should pull things into alignment with the final draft. Fixes http://llvm.org/bugs/show_bug.cgi?id=13063#add_comment .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@158280 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-09 20:01:23 +00:00
Howard Hinnant
dbd9eacde0
Fix dangling else clause. Bug found and fixed by Dimitry Andric.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157779 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-31 23:12:03 +00:00
Howard Hinnant
6467aeb7c9
Fix the new _ALIGNAS_TYPE per instructions supplied by Eli Friedman.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157765 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-31 20:14:00 +00:00
Howard Hinnant
cbdd0896d3
Protect use of alignas against older versions of clang
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157764 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-31 19:31:14 +00:00
Howard Hinnant
635ce1d127
The rules for emplace in map, multimap, unordered_map and unordered_multimap changed a while back and I'm just now updating to these new rules. In a nutshell, you've got to know you're emplacing to a pair and use one of pair's constructors. I made one extension: If you want to emplace the key and default construct the mapped_type, you can just emplace(key), as opposed to emplace(piecewise_construct, forward_as_tuple(key), forward_as_tuple()).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157503 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-25 22:04:21 +00:00
Howard Hinnant
3e3e5ebc72
Fix memory corruption bug found and fixed by Andrew C. Morrow.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157476 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-25 15:55:46 +00:00
Howard Hinnant
9b763e0945
Revert fix to http://llvm.org/bugs/show_bug.cgi?id=12867 for the reason now included in the code comment.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157128 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-19 20:20:49 +00:00
Douglas Gregor
0855ddeb24
Revert my _LIBCPP_INLINE_VISIBILITY changes, r157097 and r157107
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-19 07:14:17 +00:00
Douglas Gregor
f20f0d3fc5
valarray resize should not be _LIBCPP_INLINE_VISIBILITY
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157107 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-19 07:01:14 +00:00
Douglas Gregor
e9e4b855b8
Move _LIBCPP_VISIBLE_INLINE from the out-of-line definitions of member
...
functions to the original declarations, so that Clang will actually
see them. Part of <rdar://problem/11489333>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157097 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-19 04:41:25 +00:00
Howard Hinnant
762657693d
Protect __shared_weak_count::__get_deleter declaration with _LIBCPP_NO_RTTI. Fixes http://llvm.org/bugs/show_bug.cgi?id=12867
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@157049 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-18 13:06:21 +00:00
Howard Hinnant
ffa7fbef7b
Fix several bugs in find/count specialized for bits.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@156546 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10 14:55:00 +00:00
Howard Hinnant
b3cf4b5b54
Add friends __count_bool_true and __count_bool_false to __bit_iterator.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@156543 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-10 14:01:40 +00:00
Howard Hinnant
f867f6326b
SFINAE __bit_iterator such that it will only get instantiated with a container that has the nested type __storage_type. This prevents accidental instantiation such as in http://llvm.org/bugs/show_bug.cgi?id=12755 . This fixes http://llvm.org/bugs/show_bug.cgi?id=12755 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@156308 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-07 16:50:38 +00:00
Howard Hinnant
d2da6d2322
Constrain __bind functor constructor such that it won't accidentally get used as a copy constructor from a non-const lvalue. Fixes <rdar://problem/11359080>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@156182 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-04 17:21:02 +00:00
Howard Hinnant
f07a529b77
Change std::abs from a template function to three overloads for float, double and long double.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@156064 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-03 14:58:34 +00:00
Howard Hinnant
87073e4bfb
Greatly scale back ambitions of emulating move semantics in C++03 mode. It was causing more problems than it solved. This fixes http://llvm.org/bugs/show_bug.cgi?id=12704 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@155918 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-01 15:37:54 +00:00
Howard Hinnant
300c67ab92
Apply noexcept and constexpr to <atomic>.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@154526 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11 20:14:21 +00:00
Richard Smith
6186c7fe6a
Switch libc++ from __atomic_* builtins to __c11_atomic_* builtins.
...
Per discussion with Howard, we are not interested in maintaining
compatibility with older versions of clang.
All tests pass with ToT clang, except for two which assert due to
a pre-existing, unrelated bug.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@154521 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11 18:55:46 +00:00
David Chisnall
b2292091cb
Now that clang supports doing the right thing with regard to atomic
...
initialisation, do the right thing with regard to atomic initialisation.
Note: clang r154507 or later required for <atomic> to work now.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@154508 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-11 17:26:23 +00:00
David Chisnall
0341c820a0
Fix use of __atomic_is_lock_free() intrinsic.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@154093 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-05 13:13:24 +00:00
Howard Hinnant
616e92d748
Put std::piecewise_construct_t back into the dylib for ABI stability. When clients are in C++11/constexpr mode this will be safely ignored because piecewise_construct is then declared with internal linkage.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153981 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-03 23:45:46 +00:00
Howard Hinnant
2a5349ba66
constexpr support for <utility>. Patch contributed by Jonathan Sauer.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153968 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-03 21:09:48 +00:00
Howard Hinnant
8efd3dac5d
Update <random> with constexpr support. Patch contributed by Jonathan Sauer.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153896 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-02 21:00:45 +00:00
Howard Hinnant
60cb7d267f
Update <limits> with constexpr support. Patch contributed by Jonathan Sauer.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153888 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-02 19:23:15 +00:00
Howard Hinnant
27b4fd30ef
This is an initial commit of constexpr support as proposed by Richard Smith. This by no means completes constexpr support. Indeed, it hardly scratches the surface. All it does is lay the foundation in <__config> and changes those few places in the library that are already using that foundation.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153856 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-02 00:40:41 +00:00
Howard Hinnant
dc1345fd44
I believe tuple is still under development in the standard. Daniel Krugler is/will be making convincing arguments that a modified form of LWG 2051 (currently NAD Future) is easily acheivable and desirable. He has demonstrated that a tuple<T...> where all of the T are implicitly convertible from U... should have a tuple constructor that is also implicit, instead of explicit. This would support the use cases in LWG 2051 while not undermining T... with explicit conversions from U.... This check-in is an experimental implementation of Daniel's work. I believe this work to be mature enough to warrant inclusion into libc++. If anyone sees real-world problems that this check in causes, please let me know and I will revert it, and provide the feedback to the LWG.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153855 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-01 23:10:42 +00:00
Howard Hinnant
9aa4e11451
It appears that the standard accidentally removed the default constructor for error_category. I'm putting it back in. This fixes http://llvm.org/bugs/show_bug.cgi?id=12321 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153194 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-21 16:18:57 +00:00
David Chisnall
f2533a8798
Make sure [at_]quick_exit is in std::
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152717 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-14 14:10:37 +00:00
Jeffrey Yasskin
558ae17391
Fix moneypunct_byname algorithm to more accurately represent C locales in C++.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152501 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-10 18:31:43 +00:00
Howard Hinnant
05b57d5cdf
Change some smart_ptr == 0 to smart_ptr == nullptr. Fixes http://llvm.org/bugs/show_bug.cgi?id=12185 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152240 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-07 20:37:43 +00:00