diff options
author | Eric Fiselier <eric@efcs.ca> | 2014-07-31 19:09:26 +0000 |
---|---|---|
committer | Eric Fiselier <eric@efcs.ca> | 2014-07-31 19:09:26 +0000 |
commit | 6d3bd8f7ec0e702ec7ba2d8ac6da8a2be0ac68f9 (patch) | |
tree | e139cd3056e2bbf7cd8ddb2f0bf6ef90462ad55a | |
parent | 19fc2937824ee6586e1a8658ae891d9a864a1610 (diff) | |
download | bcm5719-llvm-6d3bd8f7ec0e702ec7ba2d8ac6da8a2be0ac68f9.tar.gz bcm5719-llvm-6d3bd8f7ec0e702ec7ba2d8ac6da8a2be0ac68f9.zip |
[libcxx] Remove use of default function template parameters in type traits. Fixes DR20484
Summary: This patch moves the SFINAE for __is_destructor_welformed out of the function template parameters. type_traits must compile in c++03 mode since it is included in c++03 headers.
Test Plan: No tests have been added.
Reviewers: danalbert, mclow.lists
Reviewed By: danalbert
Subscribers: K-ballo, cfe-commits
Differential Revision: http://reviews.llvm.org/D4735
llvm-svn: 214422
-rw-r--r-- | libcxx/include/type_traits | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libcxx/include/type_traits b/libcxx/include/type_traits index e9f6c014e2a..371a15e0b3e 100644 --- a/libcxx/include/type_traits +++ b/libcxx/include/type_traits @@ -1544,16 +1544,21 @@ template <class _Tp> struct _LIBCPP_TYPE_VIS_ONLY is_move_assignable // Otherwise, return "std::declval<_Up&>().~_Up()" is well-formed // where _Up is remove_all_extents<_Tp>::type +template <class> +struct __is_destructible_apply { typedef int type; }; + template <typename _Tp> struct __is_destructor_wellformed { - template <typename _Tp1, typename _Tp2 = decltype(_VSTD::declval<_Tp1&>().~_Tp1())> - static char __test (int); + template <typename _Tp1> + static char __test ( + typename __is_destructible_apply<decltype(_VSTD::declval<_Tp1&>().~_Tp1())>::type + ); template <typename _Tp1> static __two __test (...); static const bool value = sizeof(__test<_Tp>(12)) == sizeof(char); - }; +}; template <class _Tp, bool> struct __destructible_imp; |