hanchenye-llvm-project/libcxx/include
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
..
ext Qualify calls to addressof with std::. Bug 9106 2011-02-02 17:36:20 +00:00
__bit_reference noexcept for <bitset>. 2011-05-27 20:52:28 +00:00
__config Teach libc++ about the addressof() overloads it needs to work with 2011-06-22 22:17:44 +00:00
__functional_03 license change 2010-11-16 22:09:02 +00:00
__functional_base noexcept for <functional>. 2011-05-28 17:59:48 +00:00
__functional_base_03 license change 2010-11-16 22:09:02 +00:00
__hash_table Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. 2011-06-14 19:58:17 +00:00
__locale noexcept for Chapter 22 [localization]. 2011-05-31 15:34:58 +00:00
__mutex_base Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. 2011-06-14 19:58:17 +00:00
__split_buffer 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. 2011-06-03 15:16:49 +00:00
__sso_allocator license change 2010-11-16 22:09:02 +00:00
__std_stream Chris Jefferson noted many places where function calls needed to be qualified (thanks Chris). 2011-02-14 19:12:38 +00:00
__tree Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. 2011-06-14 19:58:17 +00:00
__tuple noexcept for <array>. 2011-05-31 21:06:33 +00:00
__tuple_03 license change 2010-11-16 22:09:02 +00:00
algorithm noexcept for <utility>. This included a little repair on pair, and some noexcept workarounds. 2011-05-27 15:04:19 +00:00
array 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. 2011-06-01 19:59:32 +00:00
atomic Provide a more readable error message for <atomic> until it is implemented. 2011-03-31 16:39:39 +00:00
bitset noexcept for <bitset>. 2011-05-27 20:52:28 +00:00
cassert license change 2010-11-16 22:09:02 +00:00
ccomplex license change 2010-11-16 22:09:02 +00:00
cctype license change 2010-11-16 22:09:02 +00:00
cerrno Changes to cerrno to protect against the case the ELAST is not defined. 2011-04-10 19:46:55 +00:00
cfenv license change 2010-11-16 22:09:02 +00:00
cfloat license change 2010-11-16 22:09:02 +00:00
chrono noexcept for <chrono>. 2011-05-28 18:34:36 +00:00
cinttypes
ciso646 license change 2010-11-16 22:09:02 +00:00
climits license change 2010-11-16 22:09:02 +00:00
clocale license change 2010-11-16 22:09:02 +00:00
cmath http://llvm.org/bugs/show_bug.cgi?id=9854. Also created an emulated hexfloat literal for use in some of the tests. <sigh> And cleaned up some harmless but irritating warnings in the tests. 2011-05-13 21:52:40 +00:00
codecvt license change 2010-11-16 22:09:02 +00:00
complex LWG 1522 2010-11-18 17:34:48 +00:00
complex.h license change 2010-11-16 22:09:02 +00:00
condition_variable N3191: C++ Timeout Specification 2010-11-20 19:16:30 +00:00
csetjmp license change 2010-11-16 22:09:02 +00:00
csignal license change 2010-11-16 22:09:02 +00:00
cstdarg license change 2010-11-16 22:09:02 +00:00
cstdbool license change 2010-11-16 22:09:02 +00:00
cstddef Move nullptr_t to unversioned namespace: Sean Hunt 2011-06-05 13:00:46 +00:00
cstdint license change 2010-11-16 22:09:02 +00:00
cstdio license change 2010-11-16 22:09:02 +00:00
cstdlib license change 2010-11-16 22:09:02 +00:00
cstring Bug 7983 fixed by Bernhard Rosenkraenzer 2010-10-14 17:11:39 +00:00
ctgmath license change 2010-11-16 22:09:02 +00:00
ctime license change 2010-11-16 22:09:02 +00:00
cwchar license change 2010-11-16 22:09:02 +00:00
cwctype license change 2010-11-16 22:09:02 +00:00
deque noexcept for <list>. 2011-06-03 17:30:28 +00:00
exception Applied noexcept to everything in [language.support] (Chapter 18) 2011-05-26 18:23:59 +00:00
forward_list Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. 2011-06-14 19:58:17 +00:00
fstream Chris Jefferson noted many places where function calls needed to be qualified (thanks Chris). 2011-02-14 19:12:38 +00:00
functional I've seen this question enough times to know that it should be fixed: http://stackoverflow.com/questions/6193734/implicit-conversions-with-stdfunction 2011-05-31 21:45:26 +00:00
future Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. 2011-06-14 19:58:17 +00:00
initializer_list Applied noexcept to everything in [language.support] (Chapter 18) 2011-05-26 18:23:59 +00:00
iomanip license change 2010-11-16 22:09:02 +00:00
ios Effort to reduce the number of exported symbols 2010-12-17 14:46:43 +00:00
iosfwd http://llvm.org/bugs/show_bug.cgi?id=9854. Also created an emulated hexfloat literal for use in some of the tests. <sigh> And cleaned up some harmless but irritating warnings in the tests. 2011-05-13 21:52:40 +00:00
iostream license change 2010-11-16 22:09:02 +00:00
istream Fixed two problems found by Chris Jefferson: Made operator>> for char consistent with gcc. Opened an LWG issue on this one. 2) Renamed some private typedefs which are causing boost grief. 2011-02-27 18:02:02 +00:00
iterator noexcept for Chapter 21 [strings]. 2011-05-29 19:57:12 +00:00
limits Applied noexcept to everything in [language.support] (Chapter 18) 2011-05-26 18:23:59 +00:00
list Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. 2011-06-14 19:58:17 +00:00
locale noexcept for Chapter 22 [localization]. 2011-05-31 15:34:58 +00:00
map 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. 2011-06-19 21:45:00 +00:00
memory Teach libc++ about the addressof() overloads it needs to work with 2011-06-22 22:17:44 +00:00
mutex I had a giant misunderstanding of what 'synchronizes with' meant in [futures.async]/p5. This invalidated the current design of async in <future>. This is a new design, based on my new understanding, which has been confirmed on the lwg mailing list. The summary is that ~future() (and ~shared_future()) will block when they are created from within async, and the thread hasn't finished yet. As part of this work I created two new type traits: __invokable<F, Args...>::value and __invoke_of<F, Args...>::type. These are what result_of<F(Args...)> wanted to be when it grew up, but never will be. __invoke_of is carefully crafted so that it can serve as its own enable_if (type doesn't exist if the signature isn't invokable). All of this work is C++11 only. 2011-05-19 15:05:04 +00:00
new Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. 2011-06-14 19:58:17 +00:00
numeric license change 2010-11-16 22:09:02 +00:00
ostream Chris Jefferson found a missing const (Bugzilla 9632) 2011-04-05 14:55:28 +00:00
queue noexcept for <queue>. 2011-06-04 21:32:33 +00:00
random Think-o in poisson_distribution at mean == 10 2011-04-14 15:59:22 +00:00
ratio Upgrade <ratio> to use template aliases when available. 2011-05-31 16:55:36 +00:00
regex Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. 2011-06-14 19:58:17 +00:00
scoped_allocator noexcept for <scoped_allocator>. 2011-05-28 18:51:12 +00:00
set noexcept for <set>. Plus a few fixes to noexcept for <map>. 2011-06-04 15:22:34 +00:00
sstream Chris Jefferson noted many places where function calls needed to be qualified (thanks Chris). 2011-02-14 19:12:38 +00:00
stack noexcept for <stack>. This completes noexcept for Chapter 23 [containers]. 2011-06-04 22:09:19 +00:00
stdexcept Applied noexcept to everything in [diagnostics] (Chapter 19) 2011-05-26 19:48:01 +00:00
streambuf license change 2010-11-16 22:09:02 +00:00
string Provide names for template and function parameters in forward declarations. The purpose is to aid automated documentation tools. 2011-06-14 19:58:17 +00:00
strstream license change 2010-11-16 22:09:02 +00:00
system_error Applied noexcept to everything in [diagnostics] (Chapter 19) 2011-05-26 19:48:01 +00:00
tgmath.h license change 2010-11-16 22:09:02 +00:00
thread I had a giant misunderstanding of what 'synchronizes with' meant in [futures.async]/p5. This invalidated the current design of async in <future>. This is a new design, based on my new understanding, which has been confirmed on the lwg mailing list. The summary is that ~future() (and ~shared_future()) will block when they are created from within async, and the thread hasn't finished yet. As part of this work I created two new type traits: __invokable<F, Args...>::value and __invoke_of<F, Args...>::type. These are what result_of<F(Args...)> wanted to be when it grew up, but never will be. __invoke_of is carefully crafted so that it can serve as its own enable_if (type doesn't exist if the signature isn't invokable). All of this work is C++11 only. 2011-05-19 15:05:04 +00:00
tuple 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. 2011-06-01 19:59:32 +00:00
type_traits 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. 2011-06-19 21:45:00 +00:00
typeindex noexcept for <typeindex>. This completes Chapter 20 [utilities]. 2011-05-28 18:57:24 +00:00
typeinfo Applied noexcept to everything in [language.support] (Chapter 18) 2011-05-26 18:23:59 +00:00
unordered_map 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. 2011-06-19 21:45:00 +00:00
unordered_set noexcept for <unordered_set>. 2011-06-04 20:18:37 +00:00
utility 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. 2011-06-01 19:59:32 +00:00
valarray license change 2010-11-16 22:09:02 +00:00
vector noexcept for <vector>. This also includes installing move_if_noexcept() into vector. 2011-06-03 19:40:40 +00:00