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.
---
v2 rewrites commit message to sell it better.

 libstdc++-v3/include/std/string_view | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libstdc++-v3/include/std/string_view 
b/libstdc++-v3/include/std/string_view
index 735d46f2de7..efbf432f112 100644
--- a/libstdc++-v3/include/std/string_view
+++ b/libstdc++-v3/include/std/string_view
@@ -621,6 +621,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   // 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
@@ -633,7 +636,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
     [[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)); }
-- 
2.54.0

Reply via email to