C++ Logo

std-proposals

Advanced search

Re: missing operator + and += overloads for std::string_view

From: Giuseppe D'Angelo <giuseppe.dangelo_at_[hidden]>
Date: Mon, 10 Aug 2020 16:35:12 +0200
On 10/08/2020 16:23, Arthur O'Dwyer via Std-Proposals wrote:
> Still, I suspect I'm missing at least one, maybe two, other reasons not
> to support `string += string_view`. Anyone got any?

Apart from overload resolution issues, I can't think of a scenario where
supporting string+=const char* makes sense, and string+=string_view
doesn't.

For the record, Qt supports QString+=QStringView, and even
QStringView+QStringView if compiled with the magic string builder
operator+ enabled (otherwise it's operator%).

My 2 c,

-- 
Giuseppe D'Angelo | giuseppe.dangelo_at_[hidden] | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

Received on 2020-08-10 09:38:40