Commit Graph

716 Commits

Author SHA1 Message Date
Howard Hinnant
90d7785eba http://llvm.org/bugs/show_bug.cgi?id=10250
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134325 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-02 18:22:36 +00:00
Howard Hinnant
74248888ab Changed constraints on pair and tuple constructors from is_convertible to is_constructible.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134252 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-01 20:12:51 +00:00
Howard Hinnant
61aa6013c3 Correct for new rules regarding implicitly deleted special members. http://llvm.org/bugs/show_bug.cgi?id=10191
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134248 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-01 19:24:36 +00:00
Howard Hinnant
0949eedbd6 _STD -> _VSTD to avoid macro clash on windows
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134190 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-30 21:18:19 +00:00
Howard Hinnant
d318d49e5c Patch by Petteri Räty, http://llvm.org/bugs/show_bug.cgi?id=8992
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@134155 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-30 14:21:55 +00:00
Howard Hinnant
a2a08b43ee test for pair piecewise construction
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133667 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 23:51:19 +00:00
Douglas Gregor
35d2fcfc8e 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>.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133656 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 22:17:44 +00:00
Howard Hinnant
f5d76a7afc Add instructions for -U__STRICT_ANSI__ for Mac OS 10.6
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133616 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-22 12:13:55 +00:00
Howard Hinnant
7604fea08c 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133402 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-19 21:45:00 +00:00
Howard Hinnant
d4b957820c Miscellaneous minor fixes in <type_traits>
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133401 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-19 19:12:59 +00:00
Howard Hinnant
2b1b2d40d7 Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@133008 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-14 19:58:17 +00:00
Nick Kledzik
8f5f2563aa more Apple build system tweaks
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132819 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-09 23:31:35 +00:00
Howard Hinnant
c7c3891199 Update CREDITS.TXT
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132780 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-09 16:53:33 +00:00
Howard Hinnant
c28dbeee52 Move nullptr_t to unversioned namespace: Sean Hunt
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132665 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-05 13:00:46 +00:00
Howard Hinnant
58cd8231d8 noexcept for <stack>. This completes noexcept for Chapter 23 [containers].
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132652 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 22:09:19 +00:00
Howard Hinnant
6a09441022 noexcept for <queue>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132650 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 21:32:33 +00:00
Howard Hinnant
04dae1df22 noexcept for <unordered_set>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132647 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 20:18:37 +00:00
Howard Hinnant
5f2f14c5d2 noexcept for <unordered_map>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132646 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 18:54:24 +00:00
Howard Hinnant
8b53768dac Made more implementation details of [multi]map/set noexcept.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132642 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 17:10:24 +00:00
Howard Hinnant
b2e2a8f6f3 noexcept for <set>. Plus a few fixes to noexcept for <map>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132640 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 15:22:34 +00:00
Howard Hinnant
7686add61e noexcept for <map>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132639 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-04 14:31:57 +00:00
Howard Hinnant
d1d27a4afa noexcept for <vector>. This also includes installing move_if_noexcept() into vector.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132577 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 19:40:40 +00:00
Howard Hinnant
53f7d4cc62 Bring noexcept for <string> inline with other containers.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132573 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 18:40:47 +00:00
Howard Hinnant
c560727d5e noexcept for <list>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132562 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 17:30:28 +00:00
Howard Hinnant
b965fed10b noexcept for <forward_list>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132553 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 16:20:53 +00:00
Howard Hinnant
009b2c4583 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132549 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 15:16:49 +00:00
Howard Hinnant
93f2764b16 Add noexcept tests for deque.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132523 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-03 01:46:22 +00:00
Howard Hinnant
18884f4e9f 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132490 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-02 21:38:57 +00:00
Howard Hinnant
0a612b0891 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132480 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-02 20:00:14 +00:00
Howard Hinnant
8790cabd86 noexcept for forward_list.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132461 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-02 16:44:28 +00:00
Howard Hinnant
a12beb35e5 noexcept for deque.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132459 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-02 16:10:22 +00:00
Howard Hinnant
aabf28721b 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132421 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-01 19:59:32 +00:00
Howard Hinnant
d737382dfd Turning on cxx_nullptr exposed a latent bug in is_function, causing nullptr to wrongly classify as a function. Fixed.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132406 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-01 17:25:11 +00:00
Howard Hinnant
083ba5f5ca I've seen this question enough times to know that it should be fixed: http://stackoverflow.com/questions/6193734/implicit-conversions-with-stdfunction
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132363 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 21:45:26 +00:00
Howard Hinnant
f0562af9dd noexcept for <array>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132359 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 21:06:33 +00:00
Howard Hinnant
20eda8b563 Upgrade <ratio> to use template aliases when available.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132342 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 16:55:36 +00:00
Howard Hinnant
c983454d30 noexcept for Chapter 22 [localization].
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132337 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 15:34:58 +00:00
Howard Hinnant
c26fd8061e Add _ATTRIBUTE macro for gcc: Justin Hibbits
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132334 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-31 13:13:49 +00:00
Howard Hinnant
a6119a86c5 noexcept for Chapter 21 [strings].
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132296 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-29 19:57:12 +00:00
Howard Hinnant
d5fed03778 http://llvm.org/bugs/show_bug.cgi?id=10045 . Please review, I have not tested this on linux.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132287 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-29 13:57:49 +00:00
Howard Hinnant
ad1a5cc5f0 minor documentation update
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132286 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-29 13:53:56 +00:00
Howard Hinnant
0687adca37 noexcept for <typeindex>. This completes Chapter 20 [utilities].
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132267 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-28 18:57:24 +00:00
Howard Hinnant
0667433587 noexcept for <scoped_allocator>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132266 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-28 18:51:12 +00:00
Howard Hinnant
756a1763d1 noexcept for <chrono>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132265 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-28 18:34:36 +00:00
Howard Hinnant
603d2c0989 noexcept for <functional>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132264 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-28 17:59:48 +00:00
Howard Hinnant
1694d23e23 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|
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132261 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-28 14:41:13 +00:00
Howard Hinnant
10f25d2739 noexcept for <bitset>.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132216 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 20:52:28 +00:00
Howard Hinnant
a5e0121b8d 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.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132204 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 19:08:18 +00:00
Howard Hinnant
e9b2c2d669 noexcept for <utility>. This included a little repair on pair, and some noexcept workarounds.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132186 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-27 15:04:19 +00:00
Howard Hinnant
1e15fd1856 Applied noexcept to everything in [diagnostics] (Chapter 19)
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@132137 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-26 19:48:01 +00:00