summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix type in tuple test. Sorry for the noiseEric Fiselier2015-12-181-2/+2
| | | | llvm-svn: 255944
* [libcxx] LWG2485: get() should be overloaded for const tuple&&. Patch from ↵Eric Fiselier2015-12-185-11/+264
| | | | | | | K-Ballo. Review: http://reviews.llvm.org/D14839 llvm-svn: 255941
* Fix various GCC mis-configurations for newer versions.Eric Fiselier2015-12-151-5/+4
| | | | | | | | | | | | This patch goes through and enables C++11 and C++14 features for newer GCC's. The main changes are: 1. Turn on variable templates. (Uses __cpp_variable_templates) 2. Assert atomic<Tp> is trivially copyable (Uses _GNUC_VER >= 501). 3. Turn on trailing return support for GCC. (Uses _GNUC_VER >= 404) 4. XFAIL void_t test for GCC 5.1 and 5.2. Fixed in GCC 6. llvm-svn: 255585
* K-Ballo pointed out a mistake in the add_lvalue_ref tests I checked in; now ↵Marshall Clow2015-12-141-7/+7
| | | | | | more of them are passing. Thanks llvm-svn: 255519
* Add add_lvalue_ref tests for a few function types, with a note why not moreMarshall Clow2015-12-141-0/+36
| | | | llvm-svn: 255513
* Use __make_integer_seq builtin for std::make_integer_sequence. Patch by K-ballo.Eric Fiselier2015-12-094-11/+49
| | | | llvm-svn: 255162
* Last bit of P0006; mark it as completeMarshall Clow2015-11-301-0/+4
| | | | llvm-svn: 254290
* Fix bugs in alignment_of_v, etc. Re-enable the newly added testsMarshall Clow2015-11-303-16/+16
| | | | llvm-svn: 254289
* Temporarily disable new tests while I figure out what's going onMarshall Clow2015-11-303-19/+19
| | | | llvm-svn: 254288
* Fix bad macrosMarshall Clow2015-11-301-1/+1
| | | | llvm-svn: 254287
* Implement more of P0006; Type Traits Variable Templates. <ratio>Marshall Clow2015-11-306-54/+120
| | | | llvm-svn: 254285
* Fix bad macros in testsMarshall Clow2015-11-303-5/+5
| | | | llvm-svn: 254284
* Implement more of P0006; Type Traits Variable Templates.Marshall Clow2015-11-306-2/+68
| | | | llvm-svn: 254283
* Add tests for the extended integer types - as required by LWG#2119Marshall Clow2015-11-171-0/+40
| | | | llvm-svn: 253376
* Implement P0007: Constant View: A proposal for a std::as_const helper ↵Marshall Clow2015-11-172-0/+68
| | | | | | function template. llvm-svn: 253274
* Implement P0013R1: Logical Operator Type Traits. Make a hidden ↵Marshall Clow2015-11-163-0/+171
| | | | | | implementation (__and_, __or_, and __not_) so that we can use them elsewhere in non-C++17 code - for example, in the LFTS llvm-svn: 253215
* Implement P0074: Making owner_less more flexibleMarshall Clow2015-11-121-0/+40
| | | | llvm-svn: 252905
* Fix typo I just introduced.Marshall Clow2015-11-101-1/+1
| | | | llvm-svn: 252614
* Walter pointed out some missing includes in the tests. Fixing the includes ↵Marshall Clow2015-11-1059-31/+85
| | | | | | uncovered a couple bugs in the _v type traits. Fixed those, too llvm-svn: 252612
* Explicitly #include <utility> so that we get std::move. Thanks to Walter for ↵Marshall Clow2015-11-101-0/+1
| | | | | | the bug report. llvm-svn: 252610
* Make it possible to build a no-exceptions variant of libcxx.Asiri Rathnayake2015-11-1018-0/+18
| | | | | | | | | | | | Fixes a small omission in libcxx that prevents libcxx being built when -DLIBCXX_ENABLE_EXCEPTIONS=0 is specified. This patch adds XFAILS to all those tests that are currently failing on the new -fno-exceptions library variant. Follow-up patches will update the tests (progressively) to cope with the new library variant. Change-Id: I4b801bd8d8e4fe7193df9e55f39f1f393a8ba81a llvm-svn: 252598
* More of P0006R0: type traits variable aliases for C++17.Marshall Clow2015-11-0726-5/+234
| | | | llvm-svn: 252406
* Implement P0092R1 for C++1zMarshall Clow2015-11-0514-0/+589
| | | | llvm-svn: 252195
* Remove undefined behavior from some tests. Same pattern as the ↵Marshall Clow2015-11-022-10/+16
| | | | | | unitialized_copy tests llvm-svn: 251804
* Remove undefined behavior from some tests. Thanks to Walter Brown for the ↵Marshall Clow2015-11-022-10/+18
| | | | | | heads-up. llvm-svn: 251802
* Improve the tests for 'is_literal_type'Marshall Clow2015-11-011-18/+62
| | | | llvm-svn: 251767
* Implement the first part of P0006R0: Adopt Type Traits Variable Templates ↵Marshall Clow2015-11-0134-0/+2198
| | | | | | for C++17. Significantly augment the existing tests. llvm-svn: 251766
* Fix LWG#2489: mem_fn() should be noexceptMarshall Clow2015-10-251-0/+3
| | | | llvm-svn: 251257
* Add the tests for the last commitMarshall Clow2015-10-252-0/+144
| | | | llvm-svn: 251254
* Add a test for LWG#2466: allocator_traits::max_size() default behavior is ↵Marshall Clow2015-10-251-2/+2
| | | | | | incorrect llvm-svn: 251252
* Fix LWG#2127: Move-construction with raw_storage_iterator.Marshall Clow2015-10-251-4/+23
| | | | llvm-svn: 251247
* Fixed a possible overflow in a test of allocator::max_size().Marshall Clow2015-10-051-2/+2
| | | | llvm-svn: 249349
* The test I cnecked in to check the fix for PR#24890 failed (as expected) w/o ↵Marshall Clow2015-09-221-0/+1
| | | | | | the fix, but for the wrong reason. Now it fails for the right reason. llvm-svn: 248307
* Check in the test for PR#24890 that I forgot in previous commitMarshall Clow2015-09-221-0/+18
| | | | llvm-svn: 248305
* make common_type SFINAE-friendly and support void. Patch from Agustin Berge.Eric Fiselier2015-09-081-4/+54
| | | | | | | This patch also fixes PR22135. (https://llvm.org/bugs/show_bug.cgi?id=22135) See the review for more information: http://reviews.llvm.org/D6964 llvm-svn: 246977
* Suppress clang warnings in some testsEric Fiselier2015-08-302-2/+12
| | | | llvm-svn: 246399
* [libcxx] Rewrite C++03 __invoke.Eric Fiselier2015-08-262-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch rewrites the C++03 `__invoke` and related meta-programming. There are a number of major changes. `__invoke` in C++03 now has a fallback overload for when the invoke expression is ill-formed (similar to C++11). This means that the `__invoke_return` traits will return `__nat` when `__invoke(...)` is ill formed. This would previously cause a compile error. Bullets 1-4 of `__invoke` have been rewritten. In the old version `__invoke` had 32 overloads for bullets 1 and 2, one for each possible cv-qualified function signature with arities 0-3. 64 overloads would be needed to support member functions with varargs. Currently these overloads were fundamentally broken. An example overload looked like: ``` template <class Rp, class Tp, class T1, class A0> Rp __invoke(Rp (Tp::*pm)(A0) const, T1&, A0&) ``` Because `A0` appeared in two different deducible contexts it would have to deduce to be an exact match or the overload would be rejected. This is made even worse because `A0` appears without a reference qualifier in the member function signature and with a reference qualifier as an `__invoke` parameter. This means that only member functions that took all of their arguments by value could be matched. One possible fix would be to make the second occurrence of `A0` appear in a non-deducible context. This way any type convertible to `A0` could be passed as the first parameter. The benefit of this approach is that the signature of the member function enforces the arity and types taken by the `__invoke` signature it generates. However nothing in the `INVOKE` specification requires this behavior. My solution is to use a `__invoke_enable_if<PM_Type, Tp>` metafunction to selectively enable the `__invoke` overloads for bullets 1, 2, 3 and 4. It uses `__member_function_traits` to inspect and extract the return type and class type of the pointer to member. Using `__member_function_traits` to inspect `PM_Type` also allows us to reduce the number of `__invoke` overloads from 32 to 8 and add varargs support at the same time. Because `__invoke_enable_if` knows the exact return type of `__invoke` for bullets 1-4 we no longer need to use `decltype(__invoke(...))` to compute the return type in the `__invoke_return*` traits. This will reduce the problems caused by `#define decltype(X) __typeof__(X)` in C++03. Tests for this change have already been committed. All tests in `test/std/utilities/function.objects` now pass in C++03, previously there were 20 failures. Reviewers: K-ballo, howard.hinnant, mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11553 llvm-svn: 246068
* Move test/std/utilities/date.time to proper stable name utilities/time/date.timeEric Fiselier2015-08-245-72/+0
| | | | llvm-svn: 245877
* Misc drive-by cleanups. NFCJonathan Roelofs2015-08-241-0/+2
| | | | | | http://reviews.llvm.org/D12294 llvm-svn: 245876
* Cleanup unique_ptr failure tests and convert them to Clang verifyEric Fiselier2015-08-208-217/+98
| | | | llvm-svn: 245529
* Add files that got missed in r245512.Eric Fiselier2015-08-194-179/+89
| | | | llvm-svn: 245513
* More unique_ptr test cleanup. Fixes in <memory> to come later.Eric Fiselier2015-08-195-132/+114
| | | | llvm-svn: 245512
* [libcxx] Fix PR23589: std::function doesn't recognize null pointer to ↵Eric Fiselier2015-08-181-0/+247
| | | | | | | | | | | | | | | | | | | | varargs function. Summary: This patch fixes __not_null's detection of nullptr by breaking it down into 4 cases. 1. `__not_null(Tp const&)`: Default case. Tp is not null. 2. `__not_null(Tp* __ptr);` Case for pointers to functions. 3. `__not_null(_Ret _Class::* __ptr);` Case for pointers to members. 4. `__not_null(function<Tp> const&);`: Cases for other std::functions. Reviewers: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D11111 llvm-svn: 245335
* Fix failing unique_ptr tests.Eric Fiselier2015-07-312-38/+7
| | | | | | | | When I was refactoring the unique_ptr.single.ctor tests I added a test deleter, 'NCDeleter', to deleter.h. Other tests that include deleter.h redefine the NCDeleter type causing test failures. llvm-svn: 243733
* Start cleanup of unique_ptr tests.Eric Fiselier2015-07-3128-1575/+894
| | | | | | | | | | | | | | | | One of the last sections of tests that still fail in C++03 are the unique_ptr tests. This patch begins cleaning up the tests and fixing C++03 failures. The main changes of this patch: - The "Deleter" type in "deleter.h" tried to be "move-only" in C++03. However the move simulation no longer works (see "__rv"). "Deleter" is now copy constructible in C++03. However copying "Deleter" will "move" the test value instead of copying it. - Reduce the unique.ptr.single.ctor tests files from ~25 to 4. There is no reason the tests were split through so many files. llvm-svn: 243730
* Fix a handful of tests that fail in C++03Eric Fiselier2015-07-283-22/+20
| | | | llvm-svn: 243392
* Checking more __invoke tests.Eric Fiselier2015-07-284-0/+1126
| | | | | | | Before I start trying to fix __invoke in C++03 it needs better test coverage. This patch adds a large amount of tests for __invoke. llvm-svn: 243366
* Cleanup <__functional_03>Eric Fiselier2015-07-229-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | <__functional_03> provides the C++03 definitions for std::memfun and std::function. However the interaction between <functional> and <__functional_03> is ugly and duplicates code needlessly. This patch cleans up how the two headers work together. The major changes are: - Provide placeholders, is_bind_expression and is_placeholder in <functional> for both C++03 and C++11. - Provide bad_function_call, function fwd decl, __maybe_derive_from_unary_function and __maybe_derive_from_binary_function in <functional> for both C++03 and C++11. - Move the <__functional_03> include to the bottom of <functional>. This makes it easier to see how <__functional_03> interacts with <functional> - Remove a commented out implementation of bind in C++03. It's never going to get implemented. - Mark almost all std::bind tests as unsupported in C++03. std::is_placeholder works in C++03 and C++11. std::is_bind_expression is provided in C++03 but always returns false. llvm-svn: 242870
* [libcxx] Get is_*_destructible tests passing in C++03.Eric Fiselier2015-07-183-38/+73
| | | | | | | | | | | | Summary: This patch adds proper guards to the is_destructible tests depending on the standard version so that they pass in c++03. Reviewers: mclow.lists, EricWF Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D10047 llvm-svn: 242612
* Cleanup tests that fail in C++1z and with Clang 3.8Eric Fiselier2015-07-177-369/+242
| | | | llvm-svn: 242581
OpenPOWER on IntegriCloud