| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
- As of this commit, the test suite should now fully pass on both darwin11 and
darwin12 when testing against either a locally built libc++ or the system libc++.
llvm-svn: 174478
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=14585.
llvm-svn: 170026
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocate two
integers which remain unused and are subsequently leaked, so the test
fail when run under valgrind. Unless I'm overlooking a subtle reason
why they are needed I think they can be removed, allowing these tests
to pass under valgrind. The attached patch removes the variables. If
there is a reason for them to exist, I can change this to just delete
them at the end of the test.
llvm-svn: 161195
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
llvm-svn: 160940
|
|
|
|
|
|
| |
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>.
llvm-svn: 160285
|
|
|
|
| |
llvm-svn: 160184
|
|
|
|
| |
llvm-svn: 159899
|
|
|
|
| |
llvm-svn: 159857
|
|
|
|
|
|
| |
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.
llvm-svn: 153855
|
|
|
|
|
|
| |
__is_trivially_assignable traits. Fixes r10925427 and http://llvm.org/bugs/show_bug.cgi?id=12038.
llvm-svn: 151406
|
|
|
|
|
|
| |
adding support for nullptr, and using less<T*>. Fixes http://llvm.org/bugs/show_bug.cgi?id=12056.
llvm-svn: 151084
|
|
|
|
| |
llvm-svn: 150887
|
|
|
|
|
|
| |
undetected because I had failed to test assigning from a const lvalue. This fixes http://llvm.org/bugs/show_bug.cgi?id=11921
llvm-svn: 150613
|
|
|
|
|
|
| |
and also for basic_string. Also made hash<thread::id> ever so slighly more portable. I had to tweak one test which is questionable (definitely not portable) anyway.
llvm-svn: 145795
|
|
|
|
| |
llvm-svn: 143519
|
|
|
|
|
|
|
| |
between C++03 and C++0x and its effect on exceptions, and another two to
not test move construction when rvalue references are not available.
llvm-svn: 135445
|
|
|
|
|
|
| |
std::underlying_type.
llvm-svn: 135410
|
|
|
|
| |
llvm-svn: 134639
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=10191
llvm-svn: 134248
|
|
|
|
| |
llvm-svn: 133667
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
bugs. C++11 only.
llvm-svn: 131667
|
|
|
|
| |
llvm-svn: 131483
|
|
|
|
|
|
| |
be test bugs.
llvm-svn: 131479
|
|
|
|
| |
llvm-svn: 131407
|
|
|
|
|
|
| |
is_trivially_constructible, is_trivially_assignable and underlying_type.
llvm-svn: 131291
|
|
|
|
|
|
| |
to turn on support for alias templates.
llvm-svn: 131199
|
|
|
|
| |
llvm-svn: 124502
|
|
|
|
| |
llvm-svn: 124193
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a cv-qualifier rvalue reference to the type, e.g.,
template <class _Tp> char __test(const volatile typename remove_reference<_Tp>::type&&);
The use of this function signature rather than the more
straightforward one used in C++98/03 mode, e.g.,
template <class _Tp> char __test(_Tp);
is broken in two ways:
1) An rvalue reference cannot bind to lvalues, so is_convertible<X&,
X&>::value would be false. This breaks two of the unique_ptr tests
on Clang and GCC >= 4.5. Prior GCC's seem to have allowed rvalue
references to bind to lvalues, allowing this bug to slip in.
2) By adding cv-qualifiers to the type we're converting to, we get
some incorrect "true" results for, e.g., is_convertible<const X&, X&>::value.
llvm-svn: 124166
|
|
|
|
|
|
| |
(http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#1385). This issue is only in Ready status, meaning it is not official, but probably will be this March in Madrid. It was tentatively accepted in Batavia with the previso that Bill and I didn't have any problems implementing it. This is my part of that agreement.
llvm-svn: 121619
|
|
|
|
| |
llvm-svn: 121503
|
|
|
|
| |
llvm-svn: 121502
|
|
|
|
| |
llvm-svn: 121275
|
|
|
|
| |
llvm-svn: 120036
|
|
|
|
| |
llvm-svn: 120029
|
|
|
|
| |
llvm-svn: 119909
|
|
|
|
| |
llvm-svn: 119906
|
|
|
|
|
|
| |
emulation; waiting on compiler intrinsics to do it right.
llvm-svn: 119854
|
|
|
|
| |
llvm-svn: 119699
|
|
|
|
| |
llvm-svn: 119609
|
|
|
|
| |
llvm-svn: 119571
|
|
|
|
| |
llvm-svn: 119545
|
|
|
|
| |
llvm-svn: 119541
|
|
|
|
| |
llvm-svn: 119395
|
|
|
|
|
|
| |
has_nothrow_copy_assign, has_trivial_destructor, has_virtual_destructor, is_pod. Implemented has_copy_assign.
llvm-svn: 113373
|
|
|
|
| |
llvm-svn: 113364
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=8109 to take care of several types which don't work yet. If there is some reason we don't want to handle these types in the compiler, I can handle most of them in the library.
llvm-svn: 113312
|
|
|
|
|
|
| |
only works for scalar types on clang. Ultimately this needs a compiler-supported is_constructible which clang is missing, and won't be able to use until it gets variadic templates.
llvm-svn: 113304
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=8107 to take care of several types which don't work yet. If there is some reason we don't want to handle these types in the compiler, I can handle most of them in the library.
llvm-svn: 113294
|