33 constexpr std::size_t
size()
const {
return N; }
38 constexpr
const char*
c_str()
const {
return _lit; }
39 constexpr
operator const char*()
const {
return c_str(); }
42 template <
int N_PLUS_1>
43 constexpr
auto literal(
const char (&lit)[N_PLUS_1])
49 #define REQUIRES(...) typename std::enable_if<(__VA_ARGS__), bool>::type = true 87 static_assert(I >= 0,
"negative size");
96 template <
typename S1,
typename S2,
int... PACK1,
int... PACK2>
100 :
_array{s1[PACK1]..., s2[PACK2]...,
'\0'}
106 template <
int N1, REQUIRES(N1 <= N)>
107 constexpr array_
string(
108 const
string_literal<N1>& s1, const
string_literal<N - N1>& s2)
109 : array_
string{s1, s2,
internal::make_sequence<N1>{},
110 internal::make_sequence<N - N1>{}}
115 template <
int N1, REQUIRES(N1 <= N)>
116 constexpr array_
string(
117 const array_
string<N1>& s1, const
string_literal<N - N1>& s2)
118 : array_
string{s1, s2,
internal::make_sequence<N1>{},
119 internal::make_sequence<N - N1>{}}
124 template <
int N1, REQUIRES(N1 <= N)>
125 constexpr array_
string(
126 const array_
string<N1>& s1, const array_
string<N - N1>& s2)
127 : array_
string{s1, s2,
internal::make_sequence<N1>{},
128 internal::make_sequence<N - N1>{}}
132 constexpr std::
size_t size() const { return N; }
133 constexpr
char operator[](
int i) const
135 return MRPT_X_ASSERT(i >= 0 && i < N),
_array[i];
137 constexpr
const char*
c_str()
const {
return _array; }
138 constexpr
operator const char*()
const {
return c_str(); }
141 template <
int N1,
int N2>
149 template <
int N1,
int N2>
157 template <
int N1,
int N2>
#define MRPT_X_ASSERT(CHECK)
MRPT_X_ASSERT(): build error if condition is known not to work at compile time, throw an exception at...
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.