diff options
author | Marshall Clow <mclow.lists@gmail.com> | 2017-06-13 14:34:58 +0000 |
---|---|---|
committer | Marshall Clow <mclow.lists@gmail.com> | 2017-06-13 14:34:58 +0000 |
commit | 246eb897c921e1aee45361d7c10c6fd274cc7f74 (patch) | |
tree | b9a4e0c3118b52bf5abca68aadb5c046b4430a7d /include/__functional_base | |
parent | 6bb9569124fdfac71530417d701100a36dd02d51 (diff) |
Fix bug 33389 - __is_transparent check requires too much
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@305292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/__functional_base')
-rw-r--r-- | include/__functional_base | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/include/__functional_base b/include/__functional_base index 0d2c2fc65..79017fe75 100644 --- a/include/__functional_base +++ b/include/__functional_base @@ -548,16 +548,13 @@ template <class _Tp> void cref(const _Tp&&) = delete; #endif #if _LIBCPP_STD_VER > 11 -template <class _Tp1, class _Tp2 = void> -struct __is_transparent -{ -private: - struct __two {char __lx; char __lxx;}; - template <class _Up> static __two __test(...); - template <class _Up> static char __test(typename _Up::is_transparent* = 0); -public: - static const bool value = sizeof(__test<_Tp1>(0)) == 1; -}; +template <class _Tp, class, class = void> +struct __is_transparent : false_type {}; + +template <class _Tp, class _Up> +struct __is_transparent<_Tp, _Up, + typename __void_t<typename _Tp::is_transparent>::type> + : true_type {}; #endif // allocator_arg_t |