[libcxx-commits] [libcxx] [libc++] Improve code gen for string's operator== (PR #100926)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jul 30 09:04:37 PDT 2024


================
@@ -3855,16 +3859,18 @@ operator==(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Allocator>&
 template <class _CharT, class _Traits, class _Allocator>
 inline _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI bool
 operator==(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs) _NOEXCEPT {
-#if _LIBCPP_STD_VER >= 20
-  return basic_string_view<_CharT, _Traits>(__lhs) == basic_string_view<_CharT, _Traits>(__rhs);
-#else
----------------
philnik777 wrote:

AFAICT it only exists to match the standards wording. 

https://github.com/llvm/llvm-project/pull/100926


More information about the libcxx-commits mailing list