14#include "AUI/Common/AString.h"
25 static_assert(!std::is_reference<T>::value,
"====================> AClass: attempt to use AClass on a reference.");
31 auto openTag = s.find(
'<') + 1;
32 auto closeTag = s.find(
'>');
33 auto name = s.substr(openTag, closeTag - openTag);
35 if (
name.endsWith(
" &"))
38#elif AUI_COMPILER_CLANG
39 AString s = __PRETTY_FUNCTION__;
40 auto b = s.find(
"=") + 1;
41 auto e = s.find(
"&", b);
42 e = std::min(s.find(
"]", b), e);
43 auto result = s.substr(b, e - b);
44 result = result.trim();
47 AString s = __PRETTY_FUNCTION__;
48 auto b = s.find(
"with T = ") + 9;
49 return { s.begin() + b, s.end() - 1 };
53 static AString nameWithoutNamespace() {
55 auto p = s.rfind(
"::");
56 if (p != AString::NPOS) {
57 return {s.begin() + p + 2, s.end()};
62 static AString toString(
const T& t) {
63 return "<object of type " +
name() +
">";
69 return "\"" +
t +
"\"";
73inline AString AClass<int>::toString(
const int& t) {
74 return AString::number(t);
[ARROW_ERROR_MESSAGE_EXAMPLE]
Definition AClass.h:23
static AString name()
[ARROW_ERROR_MESSAGE_EXAMPLE]
Definition AClass.h:28
Represents a Unicode character string.
Definition AString.h:38
type_of< T > t
Selects views that are of the specified C++ types.
Definition type_of.h:71