# define _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP 1
# define _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE 1
# define _GLIBCXX_HAVE_BUILTIN_LAUNDER 1
-# define _GLIBCXX_BUILTIN_IS_SAME_AS(T, U) __is_same_as(T, U)
# if __GNUC__ >= 9
# define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1
# endif
+# if __GNUC__ >= 11
+# define _GLIBCXX_HAVE_BUILTIN_IS_SAME 1
+# endif
#elif defined(__is_identifier) && defined(__has_builtin)
// For non-GNU compilers:
# if ! __is_identifier(__has_unique_object_representations)
# define _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED 1
# endif
# if ! __is_identifier(__is_same)
-# define _GLIBCXX_BUILTIN_IS_SAME_AS(T, U) __is_same(T, U)
+# define _GLIBCXX_HAVE_BUILTIN_IS_SAME 1
# endif
#endif // GCC
/// is_same
template<typename _Tp, typename _Up>
struct is_same
-#ifdef _GLIBCXX_BUILTIN_IS_SAME_AS
- : public integral_constant<bool, _GLIBCXX_BUILTIN_IS_SAME_AS(_Tp, _Up)>
+#ifdef _GLIBCXX_HAVE_BUILTIN_IS_SAME
+ : public integral_constant<bool, __is_same(_Tp, _Up)>
#else
: public false_type
#endif
{ };
-#ifndef _GLIBCXX_BUILTIN_IS_SAME_AS
+#ifndef _GLIBCXX_HAVE_BUILTIN_IS_SAME
template<typename _Tp>
struct is_same<_Tp, _Tp>
: public true_type
inline constexpr size_t rank_v = rank<_Tp>::value;
template <typename _Tp, unsigned _Idx = 0>
inline constexpr size_t extent_v = extent<_Tp, _Idx>::value;
-#ifdef _GLIBCXX_BUILTIN_IS_SAME_AS
+#ifdef _GLIBCXX_HAVE_BUILTIN_IS_SAME
template <typename _Tp, typename _Up>
- inline constexpr bool is_same_v = _GLIBCXX_BUILTIN_IS_SAME_AS(_Tp, _Up);
+ inline constexpr bool is_same_v = __is_same(_Tp, _Up);
#else
template <typename _Tp, typename _Up>
inline constexpr bool is_same_v = std::is_same<_Tp, _Up>::value;