tinympl  0.2
mini MPL library for C++11
Compile-time string

Classes

class  tinympl::make_basic_string< T, ptr >
 Construct a basic_string from a constexpr pointer to a null-terminated string. More...
 
class  tinympl::basic_string< T, chars >
 A vector of values of type T. More...
 

Macros

#define MAKE_TINYMPL_STRING(name, str)
 

Typedefs

template<const char * p>
using tinympl::string = typename make_basic_string< char, p >::type
 Alias for make_basic_string of char. More...
 
template<class T , T value>
using tinympl::to_string = detail::to_string_impl< T, value >
 Construct a string from a given integral value of type T.
 
template<int value>
using tinympl::to_string_i = detail::to_string_impl< int, value >
 Construct a string from the integer value
 
template<long value>
using tinympl::to_string_l = detail::to_string_impl< long, value >
 Construct a string from the long integer value
 
template<unsigned value>
using tinympl::to_string_u = detail::to_string_impl< unsigned, value >
 Construct a string from the unsigned integer value
 
template<long long value>
using tinympl::to_string_ll = detail::to_string_impl< long long, value >
 Construct a string from the long long integer value
 

Detailed Description

Support for compile time strings

Macro Definition Documentation

#define MAKE_TINYMPL_STRING (   name,
  str 
)
Value:
constexpr const char TINYMPL_STRING_JOIN2(tinympl_string_temporary_, name) [] = str; \
typename make_basic_string< char, p >::type string
Alias for make_basic_string of char.
Definition: string.hpp:243

Define a typedef called name to a tinympl::basic_string which contains the string str

Typedef Documentation

template<const char * p>
using tinympl::string = typedef typename make_basic_string<char,p>::type

Alias for make_basic_string of char.

Construct a basic_string <char,chars...> with chars... initialized from a constexpr pointer to a null-terminated string.

Parameters
pA pointer to a constexpr null-terminated string.