![]() |
boost::taar::constexpr_string — A fixed-length string usable as a non-type template parameter.
// In header: <boost/taar/core/constexpr_string.hpp> template<std::size_t N> struct constexpr_string { // public member functions constexpr_string(char const (&)); constexpr char const * c_str() const; constexpr std::size_t size() const; constexpr std::string string() const; constexpr operator std::string() const; // public data members std::array< char, N > data; };
constexpr_string is a literal type that can be passed as an NTTP, making it possible to tag types with string identifiers at compile time. Construct it from a string literal:
using boost::taar::literals; constexpr auto kind = "users"_cs;