introspection: add fundamental types for type_string
This commit is contained in:
parent
faaa49c7e9
commit
76179f264b
@ -18,8 +18,17 @@
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
constexpr char util::type_string<bool>::value[];
|
||||
|
||||
constexpr char util::type_string< int8_t>::value[];
|
||||
constexpr char util::type_string< int16_t>::value[];
|
||||
constexpr char util::type_string< int32_t>::value[];
|
||||
constexpr char util::type_string< int64_t>::value[];
|
||||
|
||||
constexpr char util::type_string< uint8_t>::value[];
|
||||
constexpr char util::type_string<uint16_t>::value[];
|
||||
constexpr char util::type_string<uint32_t>::value[];
|
||||
constexpr char util::type_string<uint64_t>::value[];
|
||||
|
||||
constexpr char util::type_string<float>::value[];
|
||||
constexpr char util::type_string<double>::value[];
|
||||
|
@ -31,9 +31,18 @@ namespace util {
|
||||
// static const std::string value
|
||||
};
|
||||
|
||||
template <> struct type_string<bool> { static constexpr const char value[] = "bool"; };
|
||||
|
||||
template <> struct type_string< int8_t> { static constexpr const char value[] = "int8"; };
|
||||
template <> struct type_string< int16_t> { static constexpr const char value[] = "int16"; };
|
||||
template <> struct type_string< int32_t> { static constexpr const char value[] = "int32"; };
|
||||
template <> struct type_string< int64_t> { static constexpr const char value[] = "int64"; };
|
||||
|
||||
template <> struct type_string< uint8_t> { static constexpr const char value[] = "uint8"; };
|
||||
template <> struct type_string<uint16_t> { static constexpr const char value[] = "uint16"; };
|
||||
template <> struct type_string<uint32_t> { static constexpr const char value[] = "uint32"; };
|
||||
template <> struct type_string<uint64_t> { static constexpr const char value[] = "uint64"; };
|
||||
|
||||
template <> struct type_string<float > { static constexpr const char value[] = "float32"; };
|
||||
template <> struct type_string<double > { static constexpr const char value[] = "float64"; };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user