C++ Logo

std-proposals

Advanced search

Re: Automatic export literals operators into global scope when the header is included

From: Bo Persson <bo_at_[hidden]>
Date: Thu, 11 Mar 2021 12:04:30 +0100
On 2021-03-11 at 09:14, kang hewill via Std-Proposals wrote:
>
> Dear Experts:
>
> When C++14 introduces literals operators, we can conveniently use auto s
> = "hello"s; to define an std::string, but before that, we must type
> using std::string_literals::operator""s;.

You only need to type using std::literals, not the full name of all the
operators.

https://stackoverflow.com/q/38950008

I don't really see the need to change the language for such a small
convenience.


     Bo Persson

Received on 2021-03-11 05:04:41