summaryrefslogtreecommitdiffstats
path: root/libcxx/include
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/__functional_base17
1 files changed, 7 insertions, 10 deletions
diff --git a/libcxx/include/__functional_base b/libcxx/include/__functional_base
index 0d2c2fc6501..79017fe759b 100644
--- a/libcxx/include/__functional_base
+++ b/libcxx/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
OpenPOWER on IntegriCloud