13#if defined(__clang__) || defined(__GNUC__)
14#define CE_META_FUNCTION_NAME __PRETTY_FUNCTION__
15#elif defined(_MSC_VER)
16#define CE_META_FUNCTION_NAME __FUNCSIG__
18 # error Unsupported compiler
25 template <std::size_t...
Idxs>
27 return std::array{str[
Idxs]..., (
char)0x00};
33 return function.find(
"double") - 6;
39 return function.size() - function.rfind(
"double") - 6;
49 static_assert(start < end);
51 constexpr auto name = function.substr(start, (end - start));
52 if constexpr(name.find(
"class ") == 0) {
53 return makeTypeNameArray(name.substr(6), std::make_index_sequence<name.size() - 6>{});
54 }
else if constexpr(name.find(
"struct ") == 0) {
55 return makeTypeNameArray(name.substr(7), std::make_index_sequence<name.size() - 7>{});
65 return StringView{value.data(), value.size() - 1};
consteval auto getTypeNameArrayPrefix()
Definition TypeName.hpp:31
consteval auto makeTypeNameArray(StringView str, std::index_sequence< Idxs... >)
Definition TypeName.hpp:26
constexpr StringView getTypeName()
Definition TypeName.hpp:63
consteval auto getTypeNameArray()
Definition TypeName.hpp:43
consteval auto getTypeNameArraySuffix()
Definition TypeName.hpp:37
Definition Application.hpp:19
constexpr StringView getTypeName()
Definition TypeName.hpp:72
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25