35 constexpr std::size_t
size()
const {
return N; }
40 constexpr
const char*
c_str()
const {
return _lit; }
41 constexpr
operator const char*()
const {
return _lit; }
42 operator std::string()
const {
return _lit; }
45 template <
int N_PLUS_1>
46 constexpr
auto literal(
const char (&lit)[N_PLUS_1])
52 #define REQUIRES(...) typename std::enable_if<(__VA_ARGS__), bool>::type = true 90 static_assert(I >= 0,
"negative size");
99 template <
typename S1,
typename S2,
int... PACK1,
int... PACK2>
103 :
_array{s1[PACK1]..., s2[PACK2]...,
'\0'}
109 template <
int N1, REQUIRES(N1 <= N)>
110 constexpr array_
string(
111 const
string_literal<N1>& s1, const
string_literal<N - N1>& s2)
112 : array_
string{s1, s2,
internal::make_sequence<N1>{},
113 internal::make_sequence<N - N1>{}}
118 template <
int N1, REQUIRES(N1 <= N)>
119 constexpr array_
string(
120 const array_
string<N1>& s1, const
string_literal<N - N1>& s2)
121 : array_
string{s1, s2,
internal::make_sequence<N1>{},
122 internal::make_sequence<N - N1>{}}
127 template <
int N1, REQUIRES(N1 <= N)>
128 constexpr array_
string(
129 const array_
string<N1>& s1, const array_
string<N - N1>& s2)
130 : array_
string{s1, s2,
internal::make_sequence<N1>{},
131 internal::make_sequence<N - N1>{}}
135 constexpr std::
size_t size() const { return N; }
136 constexpr
char operator[](
int i) const
138 return MRPT_X_ASSERT(i >= 0 && i < N),
_array[i];
140 constexpr
const char*
c_str()
const {
return _array; }
141 constexpr
operator const char*()
const {
return c_str(); }
142 operator std::string()
const {
return c_str(); }
145 template <
int N1,
int N2>
153 template <
int N1,
int N2>
161 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.