This matches change to operator== from
r14-9642-gf4605c53ea2eeaf,
and implements exact resolution of LWG3950, "std::basic_string_view comparison
operators are overspecified". The difference between __type_identity and
type_identity is observable as illustrated by PR.
libstdc++-v3/ChangeLog:
PR libstdc++/114400
* include/std/string_view (operator<=>): Use type_identity_t
instead of __type_identity_t.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
// type (see N3766).
#if __cpp_lib_three_way_comparison
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 3950. std::basic_string_view comparison operators are overspecified
+
template<typename _CharT, typename _Traits>
[[nodiscard]]
constexpr bool
[[nodiscard]]
constexpr auto
operator<=>(basic_string_view<_CharT, _Traits> __x,
- __type_identity_t<basic_string_view<_CharT, _Traits>> __y)
+ type_identity_t<basic_string_view<_CharT, _Traits>> __y)
noexcept
-> decltype(__detail::__char_traits_cmp_cat<_Traits>(0))
{ return __detail::__char_traits_cmp_cat<_Traits>(__x.compare(__y)); }