[libcxx-commits] [libcxx] [libc++] Avoid code duplication in strings operator+ overloads (PR #126048)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Feb 6 05:12:52 PST 2025
================
@@ -3986,83 +3940,73 @@ operator>=(const _CharT* __lhs, const basic_string<_CharT, _Traits, _Allocator>&
template <class _CharT, class _Traits, class _Allocator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 basic_string<_CharT, _Traits, _Allocator>
-operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
- const basic_string<_CharT, _Traits, _Allocator>& __rhs) {
+__concatenate_strings(const _Allocator& __alloc,
+ __type_identity_t<basic_string_view<_CharT, _Traits> > __str1,
----------------
ldionne wrote:
Why are you using `__type_identity_t` here?
https://github.com/llvm/llvm-project/pull/126048
More information about the libcxx-commits
mailing list