2019-10-11 Jonathan Wakely <jwakely@redhat.com>
+ * include/std/type_traits (is_same): Replace partial specialization
+ by using __is_same_as built-in in primary template.
+ (is_same_v): Use __is_same_as built-in instead of instantiating the
+ is_same trait.
+
PR libstdc++/92059
* include/tr2/dynamic_bitset (__dynamic_bitset_base): Define all
special member functions as defaulted. Add noexcept to most members.
// Type relations.
/// is_same
- template<typename, typename>
+ template<typename _Tp, typename _Up>
struct is_same
- : public false_type { };
-
- template<typename _Tp>
- struct is_same<_Tp, _Tp>
- : public true_type { };
+ : public integral_constant<bool, __is_same_as(_Tp, _Up)>
+ { };
/// is_base_of
template<typename _Base, typename _Derived>
template <typename _Tp, unsigned _Idx = 0>
inline constexpr size_t extent_v = extent<_Tp, _Idx>::value;
template <typename _Tp, typename _Up>
- inline constexpr bool is_same_v = is_same<_Tp, _Up>::value;
+ inline constexpr bool is_same_v = __is_same_as(_Tp, _Up);
template <typename _Base, typename _Derived>
inline constexpr bool is_base_of_v = is_base_of<_Base, _Derived>::value;
template <typename _From, typename _To>