c_array_len
This commit is contained in:
parent
fb22b54960
commit
3b11ead3f5
|
|
@ -17,6 +17,9 @@
|
|||
#define _EXPAND_MACRO(s) _EXPAND_STR(s)
|
||||
#define _LOCATION " (at " _EXPAND_MACRO(__FILE__) ":" _EXPAND_MACRO(__LINE__) ")"
|
||||
|
||||
template<typename T, std::size_t N>
|
||||
consteval std::size_t c_array_len(T (&arr)[N]) { return N; }
|
||||
|
||||
#define ADD_TYPE_HINT(type) template <> constexpr const char* const to_type_hint_str::value<type> = #type
|
||||
|
||||
#define TEST_FAIL(msg) ret_val_s { "", ReturnCode::FAILED, msg }
|
||||
|
|
|
|||
Loading…
Reference in New Issue