summaryrefslogtreecommitdiffstats
path: root/libcxx/test/std/utilities/meta
Commit message (Collapse)AuthorAgeFilesLines
...
* 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-301-0/+8
| | | | llvm-svn: 246399
* [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 result_of tests and fix issues with the C++03 result_of.Eric Fiselier2015-06-132-61/+306
| | | | | | | | | | The two main fixes this patch contains are: - use __identity_t instead of common_type. common_type was used as an identity metafunction but the decay resulted in incorrect results. - Pointers to free functions were not counted as functions. Remove the pointer before checking if a type is a function. llvm-svn: 239668
* Refactor is_member_function_pointer to use is_function and not ↵Eric Fiselier2015-06-131-13/+47
| | | | | | | | | | __member_function_traits. Replacing the dependancy on __member_function_traits with is_function allows is_member_function_pointer to work more often. In particular it allows it to work when we don't have variadic templates but the function has an arity > 3. llvm-svn: 239649
* Add support for N4389 - std::bool_constantMarshall Clow2015-05-181-0/+32
| | | | llvm-svn: 237636
* Qualify an internal call in is_assignable to prevent ADL lookup, which would ↵Marshall Clow2015-04-141-0/+6
| | | | | | 'complete' an type definition unnecessarily. Thanks to Richard Smith for the report. llvm-svn: 234886
* [libcxx] Fix PR22771 - Support access control SFINAE in the library version ↵Eric Fiselier2015-03-301-0/+6
| | | | | | | | | | | | | | | | | | | of is_convertible. Summary: Currently the conversion check does not take place in a context where access control SFINAE is applied. This patch changes the context of the test expression so that SFINAE occurs if access control does not permit the conversion. Related bug: https://llvm.org/bugs/show_bug.cgi?id=22771 Reviewers: mclow.lists, rsmith, dim Reviewed By: dim Subscribers: dim, rodrigc, emaste, cfe-commits Differential Revision: http://reviews.llvm.org/D8461 llvm-svn: 233552
* Add tests for library version of is_convertibleEric Fiselier2015-03-261-0/+18
| | | | llvm-svn: 233285
* [libc++] Fix PR20084 - std::is_function<void() const> failed.Eric Fiselier2015-02-181-13/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This patch introduces some black magic to detect const and volatile qualified function types such as `void () const`. The patch works in the following way: We first rule out any type that satisfies on of the following. These restrictions are important so that the test below works properly. * `is_class<_Tp>::value` * `is_union<_Tp>::value` * `is_void<_Tp>::value` * `is_reference<_Tp>::value` * `__is_nullptr_t<_Tp>::value` If none of the above is true we perform overload resolution on `__source<_Tp>(0)` to determine the return type. * If `_Tp&` is well-formed we select `_Tp& __source(int)`. `_Tp&` is only ill formed for cv void types and cv/ref qualified function types. * Otherwise we select `__dummy_type __source(...)`. Since we know `_Tp` cannot be void then it must be a function type. let `R` be the returned from `__source<_Tp>(0)`. We perform overload resolution on `__test<_Tp>(R)`. * If `R` is `__dummy_type` we call `true_type __test(__dummy_type)`. * if `R` is `_Tp&` and `_Tp&` decays to `_Tp*` we call `true_type __test(_Tp*)`. Only references to function types decay to a pointer of the same type. * In all other cases we call `false_type __test(...)`. `__source<_Tp>(0)` will try and form `_Tp&` in the return type. if `_Tp&` is not well formed the return type of `__source<_Tp>(0)` will be dummy type. `_Tp&` is only ill-formed for cv/ref qualified function types (and void which is dealt with elsewhere). This fixes PR20084 - http://llvm.org/bugs/show_bug.cgi?id=20084 Reviewers: rsmith, K-ballo, mclow.lists Reviewed By: mclow.lists Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D7573 llvm-svn: 229696
* Get tests running with warnings. Fix warnings in headers and testsEric Fiselier2015-02-054-9/+4
| | | | llvm-svn: 228344
* Removed some tabs that snuck into the test suite. No functionality changeMarshall Clow2015-01-282-14/+14
| | | | llvm-svn: 227363
* Move test into test/std subdirectory.Eric Fiselier2014-12-20105-0/+6008
llvm-svn: 224658
OpenPOWER on IntegriCloud