diff options
Diffstat (limited to 'libcxx/include/__memory/pointer_traits.h')
| -rw-r--r-- | libcxx/include/__memory/pointer_traits.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h index 07bb6d437d7e..2549e4be7df1 100644 --- a/libcxx/include/__memory/pointer_traits.h +++ b/libcxx/include/__memory/pointer_traits.h @@ -15,7 +15,7 @@ #include <type_traits> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header +# pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD @@ -71,13 +71,12 @@ template <class _Tp, class _Up> struct __has_rebind { private: - struct __two {char __lx; char __lxx;}; - template <class _Xp> static __two __test(...); + template <class _Xp> static false_type __test(...); _LIBCPP_SUPPRESS_DEPRECATED_PUSH - template <class _Xp> static char __test(typename _Xp::template rebind<_Up>* = 0); + template <class _Xp> static true_type __test(typename _Xp::template rebind<_Up>* = 0); _LIBCPP_SUPPRESS_DEPRECATED_POP public: - static const bool value = sizeof(__test<_Tp>(0)) == 1; + static const bool value = decltype(__test<_Tp>(0))::value; }; template <class _Tp, class _Up, bool = __has_rebind<_Tp, _Up>::value> |
