13#if defined(__clang__) || defined(__GNUC__)
14 return __PRETTY_FUNCTION__;
15#elif defined(_MSC_VER)
23 static const std::string name = wrapped_type_name<T>();
29 "class y3c::internal::type_name::probe_type",
30 "y3c::internal::type_name::probe_type",
34 static std::string name;
37 if (wrapped_type_name_s<probe_type>().find(probe_type_name) !=
39 name = probe_type_name;
45 "y3c::internal::type_name::probe_type_name_used()",
46 "probe_type_name not found from signature: " +
47 wrapped_type_name_s<probe_type>());
57 return wrapped_type_name_s<probe_type>().length() -
prefix_size() -
64 static std::string name;
66 const std::string &t_name = type_name::wrapped_type_name_s<T>();
72 for (std::size_t i = 0;
73 (i = name.find(
"class ", i)) != std::string::npos; i++) {
74 if (i == 0 || (!std::isalnum(name[i - 1]) && name[i - 1] !=
'_')) {
75 name = name.replace(i, 6,
"");
78 for (std::size_t i = 0;
79 (i = name.find(
"struct ", i)) != std::string::npos; i++) {
80 if (i == 0 || (!std::isalnum(name[i - 1]) && name[i - 1] !=
'_')) {
81 name = name.replace(i, 7,
"");
const std::string & wrapped_type_name_s()
Definition typename.h:22
const std::string & probe_type_name_used()
Definition typename.h:33
size_t suffix_size()
Definition typename.h:56
size_t prefix_size()
Definition typename.h:53
const char *const probe_type_name_candidates[]
Definition typename.h:28
const char * wrapped_type_name()
Definition typename.h:12
const std::string & get_type_name()
Definition typename.h:63
void terminate_internal(std::string func, std::string what, skip_trace_tag={})
Definition terminate.h:142
#define y3c_assert_internal(cond)
Definition terminate.h:148