| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
test. This was causing a const-qualified bind result to malfunction. This was a recent regression due to the new use of __member_pointer_traits in restricting the __invokable and __invoke_of tests.
llvm-svn: 181935
|
|
|
|
|
|
| |
http://llvm.org/bugs/show_bug.cgi?id=15861 .
llvm-svn: 181377
|
|
|
|
|
|
| |
piecewise_construct_t. This fixes http://llvm.org/bugs/show_bug.cgi?id=15918 .
llvm-svn: 181217
|
|
|
|
|
|
| |
thought that sizeof(void) would take care of this. I was wrong.
llvm-svn: 180213
|
|
|
|
|
|
| |
drive-by fix of alignment_of while I was in the neighborhood.
llvm-svn: 180036
|
|
|
|
|
|
| |
char&. This fixes http://llvm.org/bugs/show_bug.cgi?id=15754
llvm-svn: 179608
|
|
|
|
|
|
| |
tuple can be explicitly converted.
llvm-svn: 179467
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
non-compiler-builtin
implementation of std::is_polymorphic does this:
template <class _Tp> struct __is_polymorphic1 : public _Tp {};
... and that g++ rejects this if _Tp has an inaccessible virtual destructor
(because __is_polymorphic1<_Tp> would have a deleted virtual destructor
overriding _Tp's non-deleted destructor). Clang was failing to reject this;
I've fixed that in r178563, but that causes libc++'s corresponding test
case to fail with both clang and gcc when using the fallback
implementation. The fallback code also incorrectly rejects final types.
The attached patch fixes the fallback implementation of is_polymorphic; we
now use dynamic_cast's detection of polymorphic class types rather than
trying to determine if adding a virtual function makes the type larger:
enable_if<sizeof((_Tp*)dynamic_cast<const volatile
void*>(declval<_Tp*>())) != 0, ...>
Two things of note here:
* the (_Tp*) cast is necessary to work around bugs in Clang and g++ where
we otherwise don't instantiate the dynamic_cast (filed as PR15656)
* the 'const volatile' is here to treat is_polymorphic<cv T> as true for a
polymorphic class type T -- my reading of the standard suggests this is
incorrect, but it matches our builtin __is_polymorphic and gcc
llvm-svn: 178576
|
|
|
|
| |
llvm-svn: 178370
|
|
|
|
|
|
| |
-fnoexceptions flag. Although this is not a complete solution, it does reduce the number of test failures on OS X from 467 to 128 on OS X when -fno-exceptions is enabled, and does not impact the number of failures at all when -fno-exceptions is not enabled. The bulk of this code was donated anonymously.
llvm-svn: 177824
|
|
|
|
|
|
|
| |
- 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
|