Top "User-defined-literals" questions

User-defined literals are a C++ language feature (new in C++11) that allow the user to define new kinds of literal modifiers that will construct objects based on the string of characters that the literal modifies.

Conveniently Declaring Compile-Time Strings in C++

Being able to create and manipulate strings during compile-time in C++ has several useful applications. Although it is possible to …

c++ string c++11 metaprogramming user-defined-literals
What new capabilities do user-defined literals add to C++?

C++11 introduces user-defined literals which will allow the introduction of new literal syntax based on existing literals (int, hex, string, …

c++ c++11 user-defined-literals
Numeric literal operator error

Why does this code: constexpr float operator "" _deg(long double d) { // returns radians return d*3.1415926535/180; } static const float ANGLES[] = {-20_…

c++ c++11 user-defined-literals
Using macro with string fails on VC 2015

Why does this fail to compile? char programDate[] = "("__DATE__")"; But this compiles fine (see space): char programDate[] = "(" __DATE__")"; I do …

c++ macros visual-studio-2015 user-defined-literals
How to write an C/C++ application that writes to a /var/log/myapp directory?

Background On Linux systems, Application Logs exist in subdirectories of /var/log, which is owned by root/root and has 755 …

c++ linux logging c++11 user-defined-literals