C++ Logo

std-proposals

Advanced search

Re: Breaking change - std::string should implicitly accept literals but not general c strings

From: Thiago Macieira <thiago_at_[hidden]>
Date: Sun, 16 Aug 2020 14:13:21 -0700
On Sunday, 16 August 2020 14:07:47 PDT Matthew Fioravante via Std-Proposals
wrote:
> At least in this particular case, it is also pretty rare. The most common
> usage that comes to mind is the snprintf idiom above, but that is going to
> be obsolete when we get fmt in the standard.

I'd really welcome a low-level type that only binds to literals, but not const
char* or stack arrays. That would indeed allow for zero-copy.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

Received on 2020-08-16 16:16:48