[Please do not mail me a copy of your followup]
Victor Bazarov <v.ba...@comcast.invalid> spake the secret code
<mlg6gj$gtd$
1...@dont-email.me> thusly:
>Solution for what? The "s"s is not a string literal, it's a
>user-defined literal, to which the paragraph you named does not relate,
>IMHO.
User-defined string literals participate in string literal
concatenation as long as only a single user-defined suffix is used on
all the string literals (or no suffix is used on some of the literals).
See <
http://en.cppreference.com/w/cpp/language/user_literal> just
above the heading "Literal Operators".
Since C++14, <chrono> defines:
constexpr std::chrono::seconds operator""s(unsigned long long s)
and <string> defines:
constexpr std::string operator""s(const char *str, std::size_t len);
constexpr std::u16string operator""s(const char16_t *str, std::size_t len);
constexpr std::u32string operator""s(const char32_t *str, std::size_t len);
constexpr std::wstring operator""s(const wchar_t *str, std::size_t len);
What's kinda cool is that normal operator overloading makes it clear
that 54s is std::chrono::seconds and "54"s is a std::string, even when
both headers are included in the same source file.
--
"The Direct3D Graphics Pipeline" free book <
http://tinyurl.com/d3d-pipeline>
The Computer Graphics Museum <
http://computergraphicsmuseum.org>
The Terminals Wiki <
http://terminals.classiccmp.org>
Legalize Adulthood! (my blog) <
http://legalizeadulthood.wordpress.com>