Howard Hinnant
ce48a1137d
_STD -> _VSTD to avoid macro clash on windows
...
llvm-svn: 134190
2011-06-30 21:18:19 +00:00
Howard Hinnant
15434707e4
Patch by Petteri Räty, http://llvm.org/bugs/show_bug.cgi?id=8992
...
llvm-svn: 134155
2011-06-30 14:21:55 +00:00
Howard Hinnant
878e035ea1
test for pair piecewise construction
...
llvm-svn: 133667
2011-06-22 23:51:19 +00:00
Douglas Gregor
64ec101eb6
Teach libc++ about the addressof() overloads it needs to work with
...
Objective-C Automatic Reference Counting, where Objective-C object
pointers can have several different qualifiers (__strong, __weak,
__autoreleasing, __unsafe_unretained). These addressof() overloads are
only provided in ARC mode, and the __weak variant is conditionalized
on having weak-reference support in the ARC runtime.
For historical reasons, Clang provides these definitions itself, and
defines the macro _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF to note when
it as done so. The code belongs here, and this redundancy will be
eliminated in the future.
Addresses <rdar://problem/9658274>.
llvm-svn: 133656
2011-06-22 22:17:44 +00:00
Howard Hinnant
8298b9c2fd
Add instructions for -U__STRICT_ANSI__ for Mac OS 10.6
...
llvm-svn: 133616
2011-06-22 12:13:55 +00:00
Howard Hinnant
a945a32981
More fixes: One of my fixes to type_traits earlier today was incorrect, so that is reverted. Recently clang appears to have tightened up its definition of is_convertible and that has caused some failures in [unordered_][multi]map. I've switched to using is_constructible to restablish the desired functionality in [unordered_][multi]map. Specifically, inserting rvalues of move-only types for the keys.
...
llvm-svn: 133402
2011-06-19 21:45:00 +00:00
Howard Hinnant
2d62821f98
Miscellaneous minor fixes in <type_traits>
...
llvm-svn: 133401
2011-06-19 19:12:59 +00:00
Howard Hinnant
ce53420e37
Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools.
...
llvm-svn: 133008
2011-06-14 19:58:17 +00:00
Nick Kledzik
50aab549c0
more Apple build system tweaks
...
llvm-svn: 132819
2011-06-09 23:31:35 +00:00
Howard Hinnant
30b7d2767c
Update CREDITS.TXT
...
llvm-svn: 132780
2011-06-09 16:53:33 +00:00
Howard Hinnant
32208bde75
Move nullptr_t to unversioned namespace: Sean Hunt
...
llvm-svn: 132665
2011-06-05 13:00:46 +00:00
Howard Hinnant
bd0c160078
noexcept for <stack>. This completes noexcept for Chapter 23 [containers].
...
llvm-svn: 132652
2011-06-04 22:09:19 +00:00
Howard Hinnant
6971d82668
noexcept for <queue>.
...
llvm-svn: 132650
2011-06-04 21:32:33 +00:00
Howard Hinnant
557da866a3
noexcept for <unordered_set>.
...
llvm-svn: 132647
2011-06-04 20:18:37 +00:00
Howard Hinnant
3714107ed6
noexcept for <unordered_map>.
...
llvm-svn: 132646
2011-06-04 18:54:24 +00:00
Howard Hinnant
e691351098
Made more implementation details of [multi]map/set noexcept.
...
llvm-svn: 132642
2011-06-04 17:10:24 +00:00
Howard Hinnant
0e9f71c13f
noexcept for <set>. Plus a few fixes to noexcept for <map>.
...
llvm-svn: 132640
2011-06-04 15:22:34 +00:00
Howard Hinnant
1052ee39cb
noexcept for <map>.
...
llvm-svn: 132639
2011-06-04 14:31:57 +00:00
Howard Hinnant
3297ed7065
noexcept for <vector>. This also includes installing move_if_noexcept() into vector.
...
llvm-svn: 132577
2011-06-03 19:40:40 +00:00
Howard Hinnant
2d45a18c24
Bring noexcept for <string> inline with other containers.
...
llvm-svn: 132573
2011-06-03 18:40:47 +00:00
Howard Hinnant
4590010473
noexcept for <list>.
...
llvm-svn: 132562
2011-06-03 17:30:28 +00:00
Howard Hinnant
91a4750733
noexcept for <forward_list>.
...
llvm-svn: 132553
2011-06-03 16:20:53 +00:00
Howard Hinnant
801291139c
After sleeping on it I've decided that all special members that can be noexcept, should be declared so. The client has the traits to detect and branch on this information, and it is often an important optimization. Give deque() a noexcept. Add test for deque default constructor and deque destructor.
...
llvm-svn: 132549
2011-06-03 15:16:49 +00:00
Howard Hinnant
60954bbbbc
Add noexcept tests for deque.
...
llvm-svn: 132523
2011-06-03 01:46:22 +00:00
Howard Hinnant
b58f59cdb3
Second try at getting noexcept on move and swap for deque. I changed std::alloctor to propagate_on_container_move_assignment so as to make deque<T> move assignment noexcept. What we really need is a compile-time switch that says an allocator always compares equal.
...
llvm-svn: 132490
2011-06-02 21:38:57 +00:00
Howard Hinnant
9eebe11dd5
I've become quite disatsified with the lack of noexcept specifications on container move construction, move assignment operator and swap. Without proper decoration on at least move construction, vectors of containers will have unacceptable performance. Here's the fix for deque.
...
llvm-svn: 132480
2011-06-02 20:00:14 +00:00
Howard Hinnant
f9dc28313f
noexcept for forward_list.
...
llvm-svn: 132461
2011-06-02 16:44:28 +00:00
Howard Hinnant
a87e836083
noexcept for deque.
...
llvm-svn: 132459
2011-06-02 16:10:22 +00:00
Howard Hinnant
bc95cf0d5f
Experimental support for a meaningful __is_swappable<T>::value. This does not appear to be strictly needed for correct functioning of the library. If it causes any problems, I'd rather pull it sooner rather than later.
...
llvm-svn: 132421
2011-06-01 19:59:32 +00:00
Howard Hinnant
e88f577da1
Turning on cxx_nullptr exposed a latent bug in is_function, causing nullptr to wrongly classify as a function. Fixed.
...
llvm-svn: 132406
2011-06-01 17:25:11 +00:00
Howard Hinnant
542b2507de
I've seen this question enough times to know that it should be fixed: http://stackoverflow.com/questions/6193734/implicit-conversions-with-stdfunction
...
llvm-svn: 132363
2011-05-31 21:45:26 +00:00
Howard Hinnant
8f0cd597f1
noexcept for <array>.
...
llvm-svn: 132359
2011-05-31 21:06:33 +00:00
Howard Hinnant
e3c6708439
Upgrade <ratio> to use template aliases when available.
...
llvm-svn: 132342
2011-05-31 16:55:36 +00:00
Howard Hinnant
b5d866d4a3
noexcept for Chapter 22 [localization].
...
llvm-svn: 132337
2011-05-31 15:34:58 +00:00
Howard Hinnant
f5c91471a4
Add _ATTRIBUTE macro for gcc: Justin Hibbits
...
llvm-svn: 132334
2011-05-31 13:13:49 +00:00
Howard Hinnant
76c7cd0e15
noexcept for Chapter 21 [strings].
...
llvm-svn: 132296
2011-05-29 19:57:12 +00:00
Howard Hinnant
28d55e0745
http://llvm.org/bugs/show_bug.cgi?id=10045 . Please review, I have not tested this on linux.
...
llvm-svn: 132287
2011-05-29 13:57:49 +00:00
Howard Hinnant
af152c8431
minor documentation update
...
llvm-svn: 132286
2011-05-29 13:53:56 +00:00
Howard Hinnant
9e5c99f61f
noexcept for <typeindex>. This completes Chapter 20 [utilities].
...
llvm-svn: 132267
2011-05-28 18:57:24 +00:00
Howard Hinnant
cfd52789dc
noexcept for <scoped_allocator>.
...
llvm-svn: 132266
2011-05-28 18:51:12 +00:00
Howard Hinnant
d53d81522d
noexcept for <chrono>.
...
llvm-svn: 132265
2011-05-28 18:34:36 +00:00
Howard Hinnant
6a07d6f06d
noexcept for <functional>.
...
llvm-svn: 132264
2011-05-28 17:59:48 +00:00
Howard Hinnant
3739fe79e5
noexcept for <memory>. I've added a few extension noexcept to: allocator_traits<A>::deallocate, allocaate<T>::deallocate, return_temporary_buffer, and default_delete<T>::operator()(T*) const. My rationale was: If a std-dicated noexcept function needs to call another std-defined function, that called function must be noexcept. We're all a little new to noexcept, so things like this are to be expected. Also included fix for broken __is_swappable trait pointed out by Marc Glisse, thanks Marc|. And fixed a test case for is_nothrow_destructible. Destructors are now noexcept by default|
...
llvm-svn: 132261
2011-05-28 14:41:13 +00:00
Howard Hinnant
d368a84c91
noexcept for <bitset>.
...
llvm-svn: 132216
2011-05-27 20:52:28 +00:00
Howard Hinnant
27d0a2a75d
noexcept for <tuple>. And in the process learned that I had done it wrong for pair's swap. I needed to create an __is_nothrow_swappable<T>::value trait that was smart enought to answer false when __is_swappable<T>::value is false. Otherwise one gets compile-time errors when using pair or tuple of non-swappable types, even if you never try to swap the pair or tuple.
...
llvm-svn: 132204
2011-05-27 19:08:18 +00:00
Howard Hinnant
a676f7d36a
noexcept for <utility>. This included a little repair on pair, and some noexcept workarounds.
...
llvm-svn: 132186
2011-05-27 15:04:19 +00:00
Howard Hinnant
a62f28994c
Applied noexcept to everything in [diagnostics] (Chapter 19)
...
llvm-svn: 132137
2011-05-26 19:48:01 +00:00
Howard Hinnant
411d1bcc3b
Turn on cxx_alias_templates support
...
llvm-svn: 132134
2011-05-26 19:07:54 +00:00
Howard Hinnant
fafca58c58
Applied noexcept to everything in [language.support] (Chapter 18)
...
llvm-svn: 132129
2011-05-26 18:23:59 +00:00
Howard Hinnant
400b244339
Added [[noreturn]] attribute everywhere it should be
...
llvm-svn: 132125
2011-05-26 17:07:32 +00:00