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
2cf89a71df
Fix test for default constructor of discrete_distribution. This partially addresses http://llvm.org/bugs/show_bug.cgi?id=12436 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153873 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-02 15:00:14 +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
Howard Hinnant
87c61a61fe
Allow libc++ to be built with CMake from within the LLVM tree. The libc++ part is just some renaming as the variable was already in use, conflicting with something else in the LLVM tree. Contributed by Ruben Van Boxem.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@153036 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-19 15:40:23 +00:00
Howard Hinnant
1378397721
Alter the terminal streams such that they do not get added to the atexit chain, and thus never get destructed.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152926 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-16 15:13:51 +00:00
David Chisnall
21a84cfb8f
Undo some overzealous #ifdefs for LIBCXXRT.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152718 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-14 14:11:13 +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
David Chisnall
b407d45d83
Don't refer to a function that doesn't exist in the quick_exit test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@152716 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-14 14:02:15 +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
David Chisnall
b56a4ada33
Define _WCHAR_T in solaris/wchar.h. This fixes a bug where Solaris 10 headers
...
try to define C++ keywords as typedefs (fixed in Solaris 11).
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151890 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02 10:56:04 +00:00
David Chisnall
b6e7c305d4
Fix MSVC / Sun #ifdef ordering. Remove another #if-nothing-#endif.
...
Sorry for the churn.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151731 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 16:41:21 +00:00
David Chisnall
26cba271cb
Remove a spurious #ifdef / #endif pair with nothing between them.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151729 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 16:22:33 +00:00
Howard Hinnant
fcbaf48f21
Add a warning to ctype<char>::classic_table() if not implemented.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151728 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 16:08:57 +00:00
Howard Hinnant
d0ed21e94d
I'm reverting one of the changes made to exception.cpp in r151717. I'm unsure what the change was trying to do, but it didn't do the right thing for __APPLE__. So instead of trying to guess what was intended, I'm just putting it back the way it was.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151727 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 15:37:30 +00:00
David Chisnall
ea2741973a
Add support files required for building on Solaris.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151721 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 13:17:28 +00:00
David Chisnall
997e454139
Solaris port. Currently sees around 200 test failures, mostly related to
...
Solaris not providing some of the locales that the test suite uses.
Note: This depends on an xlocale (partial) implementation for Solaris and a
couple of fixed standard headers. These will be committed to a branch later
today.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151720 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 13:05:08 +00:00
David Chisnall
f2b2cc6440
Make the failure reporting in testit a bit more useful.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151719 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 13:00:44 +00:00
David Chisnall
8fa14e97ca
Don't define __locale_raii if we are not going to be using it.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151718 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 13:00:07 +00:00
David Chisnall
1e8b3f96c0
Some libcxxrt-compatibility cleanups (avoid defining things twice).
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151717 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-29 12:59:17 +00:00
Howard Hinnant
4a13b2dce9
Reduce the number of move constructions when constructing a std::function. This fixes http://llvm.org/bugs/show_bug.cgi?id=12105 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151652 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-28 19:47:38 +00:00
Howard Hinnant
0438ea241e
vector::emplace_back was mistakenly requiring move assignable. Fixed that and did a little drive-by optimization at the same time. This fixes http://llvm.org/bugs/show_bug.cgi?id=12085 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151492 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 15:30:12 +00:00
Howard Hinnant
a231c37df7
update test for explicit bool operator.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151461 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 21:43:14 +00:00
Howard Hinnant
9d84832741
At least temporarily move operator new/delete from the abi back to here. I'm having trouble reexporting it as a weak symbol.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151459 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 21:36:01 +00:00
Howard Hinnant
8417c46f8d
ReExport some mor symbols from libc++abi.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151453 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 20:25:07 +00:00
Howard Hinnant
896baa2547
Silence some warnings in a test.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151451 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 20:04:11 +00:00
Howard Hinnant
4300839b5f
Hook up to the new clang __is_trivially_constructible and __is_trivially_assignable traits. Fixes r10925427 and http://llvm.org/bugs/show_bug.cgi?id=12038 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151406 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 23:32:26 +00:00
Dave Zarzycki
b9344c218b
Use Xcode relative compilers when possible
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151108 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-22 00:20:30 +00:00
Howard Hinnant
7786188d15
Modernize conversion to bool to the explicit bool conversion operator (library wide). This fixes http://llvm.org/bugs/show_bug.cgi?id=12058 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151088 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-21 21:46:43 +00:00
Howard Hinnant
3fadda314a
Modernize relational operators for shared_ptr and unique_ptr. This includes adding support for nullptr, and using less<T*>. Fixes http://llvm.org/bugs/show_bug.cgi?id=12056 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@151084 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-21 21:02:58 +00:00
Bob Wilson
d41b60b2b4
Add missing newlines at EOF.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150965 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 16:56:13 +00:00
Howard Hinnant
335b1518e4
Silence -Wmissing-field-initializers a little higher in the source.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150964 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-20 16:51:43 +00:00
Jeffrey Yasskin
e0c3b1e55c
Add myself to the CREDITS file.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150935 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 18:22:03 +00:00
Howard Hinnant
3074a05cdc
Initialize all the fields of struct tm before passing it to strftime. One of the uninitialized fields, probably the pointer field tm_zone, was causing a segfault on linux. Patch contributed by Jeffrey Yasskin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150929 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 14:55:32 +00:00
Howard Hinnant
6df1412ca6
Relax pointer output test to accept glibc's output. Patch supplied by Jeffrey Yasskin.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150927 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-19 14:51:01 +00:00
Howard Hinnant
3508b3836b
Give the emulated nullptr_t a default constructor.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150893 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 22:01:22 +00:00
Howard Hinnant
01198b313c
Exercise rvalue arguements to make_shared for C++11 mode.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150887 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-18 20:12:03 +00:00
Howard Hinnant
e1642e1c00
Move typeinfos for exceptions in <stdexcept> to the abi
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150835 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17 19:24:42 +00:00
Howard Hinnant
1e9f55f2d2
Use __is_polymorphic if available. This fixes http://llvm.org/bugs/show_bug.cgi?id=11983 . Patch contributed by Jonathan Sauer.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150614 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 20:47:11 +00:00
Howard Hinnant
2848444954
tuple was accidentally lacking a valid copy assignment operator. It went undetected because I had failed to test assigning from a const lvalue. This fixes http://llvm.org/bugs/show_bug.cgi?id=11921
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150613 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 20:13:52 +00:00
Howard Hinnant
b04ad4162d
Do not parse sign if a sign is not the next legal character when parsing floating point from an input stream. Fixes http://llvm.org/bugs/show_bug.cgi?id=11871
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150609 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 19:19:37 +00:00
Howard Hinnant
d7a2ad6a99
Another stab at fixing http://llvm.org/bugs/show_bug.cgi?id=12007 . I earlier missed that there are two common_type definitions and corrected only one of them.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150599 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 18:08:09 +00:00
Howard Hinnant
e5285fd6b6
Remove reference from common_type definition. It looks like a recent clang decltype implementation got fixed/improved and exposed this. Fixes http://llvm.org/bugs/show_bug.cgi?id=12007 .
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150581 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 15:08:30 +00:00
Howard Hinnant
b0bfd9bdd6
Implement a few optimizations for vector push_back and insert. Fixes r10828365.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150542 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-15 00:41:34 +00:00
Howard Hinnant
5f3f35fe64
Provide a move(const T&) overload for C++03 mode to enable moving from rvalues. This is to support proxy references. Fixes r10858112.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150488 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-14 16:03:09 +00:00
Howard Hinnant
982331b66e
Fix up narrowing conversions in switch statement.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@150082 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-08 19:15:06 +00:00
Howard Hinnant
67872dde14
Make attributes on definition consistent with those on declaration.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@149701 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-03 18:31:43 +00:00
Howard Hinnant
3c8432fb5b
Added some more symbols to the v2 rexport list.
...
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@149636 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-02 22:01:34 +00:00