framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Constant Groups | Macros
string_expansion.hpp File Reference

Template string expansion macros. More...

#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/punctuation/comma_if.hpp>

Go to the source code of this file.

Namespaces

 framework
 Framework namespace.
 

Constant Groups

 framework
 Framework namespace.
 

Macros

#define EXPAND_STRING(STRING)
 Expand string literal to char... pack. More...
 

Detailed Description

Template string expansion macros.

Macro Definition Documentation

#define EXPAND_STRING (   STRING)

Expand string literal to char... pack.

  Expands a string literal to a sequence of \c LENGTH characters suitable for use in 
  \c char... template parameter pack.  Characters beyond the end of the string are
  converted to \c '\0' characters.  For example, the following are equivalent:
template <char...>
struct S;
S <'H', 'e', 'l', 'l', 'o', ',', 'w', 'o', 'r', 'l', 'd', '!'> x;
S <EXPAND_STRING("Hello World!", 12)> x;
\brief LENGTH maximum string length
\brief STRING string literal
/
#define EXPAND_STRING_N(STRING, LENGTH) \
BOOST_PP_REPEAT(LENGTH, EXPAND_STRING_N_IMPL, STRING)
#else

STRING string literal