16 #ifndef IOX_UTILS_CXX_STRING_INTERNAL_HPP
17 #define IOX_UTILS_CXX_STRING_INTERNAL_HPP
33 using charArray =
char[N];
40 static constexpr uint64_t capa = 0U;
46 static constexpr uint64_t capa = N;
52 static constexpr uint64_t capa = N - 1U;
62 static uint64_t call(
const string<N>& data) noexcept
71 static uint64_t call(
const charArray<N>& data) noexcept
73 return strnlen(data, N);
80 static uint64_t call(
const std::string& data) noexcept
93 static const char* call(
const string<N>& data) noexcept
102 static const char* call(
const charArray<N>& data) noexcept
111 static const char* call(
const std::string& data) noexcept
118 template <
typename... Targs>
124 static constexpr uint64_t value = 0U;
127 template <
typename T,
typename... Targs>
134 template <
typename T>
137 static constexpr
bool value =
false;
140 template <u
int64_t N>
143 static constexpr
bool value =
true;
147 template <
typename T>
150 static constexpr
bool value =
false;
153 template <u
int64_t N>
156 static constexpr
bool value =
true;
string implementation with some adjustments in the API, because we are not allowed to throw exception...
Definition: string.hpp:86
constexpr uint64_t size() const noexcept
returns the number of characters stored in the string
Definition: string.inl:278
const char * c_str() const noexcept
returns a pointer to the char array of self
Definition: string.inl:272
building block to easily create free function for logging in a library context
Definition: lockfree_queue.hpp:28
struct to get capacity of fixed string/string literal
Definition: string_internal.hpp:39
struct to get a pointer to the char array of the fixed string/string literal/std::string
Definition: string_internal.hpp:88
struct to get size of fixed string/string literal/std::string
Definition: string_internal.hpp:57
struct to check whether an argument is a char array
Definition: string_internal.hpp:136
struct to check whether an argument is a cxx string
Definition: string_internal.hpp:149
struct to get the sum of the capacities of fixed strings/string literals
Definition: string_internal.hpp:119