diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index ad07ce92d5f4d9b659ed56d5b35e591d3b67730c..b57e3f338e92a3abee8482c5e0ed29856a2f4836 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -845,10 +845,6 @@ namespace __gnu_cxx # define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1 #endif -#if _GLIBCXX_HAS_BUILTIN(__is_same) -# define _GLIBCXX_HAVE_BUILTIN_IS_SAME 1 -#endif - #if _GLIBCXX_HAS_BUILTIN(__builtin_launder) # define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1 #endif diff --git a/libstdc++-v3/include/std/type_traits b/libstdc++-v3/include/std/type_traits index a9bb2806ca9c6c7708028ed68d1ffdaa4d1d9509..21402fd8c1321e2f9c3cf92cf0b8dc8f4e1b480f 100644 --- a/libstdc++-v3/include/std/type_traits +++ b/libstdc++-v3/include/std/type_traits @@ -1470,16 +1470,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // Type relations. /// is_same +#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same) template<typename _Tp, typename _Up> struct is_same -#ifdef _GLIBCXX_HAVE_BUILTIN_IS_SAME : public __bool_constant<__is_same(_Tp, _Up)> + { }; #else + template<typename _Tp, typename _Up> + struct is_same : public false_type -#endif { }; -#ifndef _GLIBCXX_HAVE_BUILTIN_IS_SAME template<typename _Tp> struct is_same<_Tp, _Tp> : public true_type @@ -3496,7 +3497,7 @@ template <typename _Tp> template <typename _Tp, unsigned _Idx> inline constexpr size_t extent_v<_Tp[], _Idx> = extent_v<_Tp, _Idx - 1>; -#ifdef _GLIBCXX_HAVE_BUILTIN_IS_SAME +#if _GLIBCXX_USE_BUILTIN_TRAIT(__is_same) template <typename _Tp, typename _Up> inline constexpr bool is_same_v = __is_same(_Tp, _Up); #else