[PATCH v4] libstdc++: implement concatenation of strings and string_views
François Dumont
frs.dumont@gmail.com
Thu Oct 17 04:32:08 GMT 2024
As a side note you should provide your patches as .txt files so that any
email client can render it without going through an editor.
And regarding the patch, I wonder what the std::move is for on the
returned value ?
Like this one:
+ {
+ return std::move(__lhs.append(__rhs));
+ }
As it's a C&P the question might not be for you Giuseppe.
François
On 13/10/2024 19:59, Giuseppe D'Angelo wrote:
> Hello,
>
> On 09/10/2024 22:39, Patrick Palka wrote:
>>> +#if __glibcxx_string_view >= 202403L
>>> + // const string & + string_view
>>> + template<typename _CharT, typename _Traits, typename _Alloc>
>>> + [[nodiscard]]
>>> + constexpr inline basic_string<_CharT, _Traits, _Alloc>
>>
>> Redundant 'inline's
>>
>>> + operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
>>> + type_identity_t<basic_string_view<_CharT, _Traits>> __rhs)
>>> + {
>>> + typedef basic_string<_CharT, _Traits, _Alloc> _Str;
>>
>> These typedefs might as well be usings instead
>>
>> Besides that LGTM!
>
> Thank you for the review, updated patch attached to fix both of these.
> (Just for the record, these had been C&P from the corresponding
> operator+ overloads that deal with const char *.)
>
> Thanks,
More information about the Gcc-patches
mailing list