This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++1y] Support n3599 - Literal operator templates for strings for C++1y


Here is a small patch which fixes a derp in the C++11 standard up for repair in c+14 or so.
It allows you to have things like

template<typename CharT, CharT... String>
  constexpr int
  operator"" _crypto()
  {...}

...

 int i = "hi there!"_crypto;

And many other things.

The string literal operator template can examine the string at compile time.
This is enabled with -std=c++1y.

Testing slight tweaks now.

Attachment: patch_char_template2
Description: Text document

Attachment: CL_char_template2
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]