23 constexpr
const char* type_name() noexcept {
return typeid(T).name(); }
26 constexpr
const char* type_name(
const T&) noexcept {
return type_name<T>(); }
28 template<> constexpr
const char* type_name<std::string>() noexcept {
return "string"; }
29 template<> constexpr
const char* type_name<bool>() noexcept {
return "bool"; }
30 template<> constexpr
const char* type_name<char>() noexcept {
return "char"; }
31 template<> constexpr
const char* type_name<int8_t>() noexcept {
return "int8_t"; }
32 template<> constexpr
const char* type_name<unsigned char>() noexcept {
return "uchar"; }
33 template<> constexpr
const char* type_name<short>() noexcept {
return "short"; }
34 template<> constexpr
const char* type_name<unsigned short>() noexcept {
return "ushort"; }
35 template<> constexpr
const char* type_name<int>() noexcept {
return "int"; }
36 template<> constexpr
const char* type_name<unsigned int>() noexcept {
return "uint"; }
37 template<> constexpr
const char* type_name<float>() noexcept {
return "float"; }
38 template<> constexpr
const char* type_name<double>() noexcept {
return "double"; }
41 #define VSG_type_name(T) \
42 template<> constexpr const char* type_name<T>() noexcept { return #T; } \
43 template<> constexpr const char* type_name<const T>() noexcept { return "const "#T; }
47 #define EVSG_type_name(T) \
48 template<> constexpr const char* vsg::type_name<T>() noexcept { return #T; } \
49 template<> constexpr const char* vsg::type_name<const T>() noexcept { return "const "#T; }