[PATCH v4] libstdc++: implement concatenation of strings and string_views

Giuseppe D'Angelo giuseppe.dangelo@kdab.com
Sun Oct 13 17:59:35 GMT 2024


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,
-- 
Giuseppe D'Angelo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libstdc-implement-concatenation-of-strings-and-strin.patch
Type: text/x-patch
Size: 15279 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20241013/fa513725/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://gcc.gnu.org/pipermail/libstdc++/attachments/20241013/fa513725/attachment-0001.p7s>


More information about the Libstdc++ mailing list