C++ Logo

std-discussion

Advanced search

Re: extremely long compile time with large number of string literals

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 13 Jul 2020 11:01:25 -0700
On Monday, 13 July 2020 10:56:36 PDT Andrey Semashev via Std-Discussion wrote:
> > Ideally a constexpr string object using constexpr operator new could do
> > that, but such a thing does not exist in C++ yet and definitely did not
> > for C++11 or C++14.
> >
> > The best you can get until is to benefit from the Small String
> > Optimisation.
> Using string_view instead of string would be better yet.

Indeed, but that's also C++17.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel System Software Products

Received on 2020-07-13 13:05:10