diff --git a/include/fc/reflect/typename.hpp b/include/fc/reflect/typename.hpp index 23a116b96..854319fc1 100644 --- a/include/fc/reflect/typename.hpp +++ b/include/fc/reflect/typename.hpp @@ -37,13 +37,13 @@ namespace fc { template<> struct get_typename { static const char* name() { return "value"; } }; template<> struct get_typename { static const char* name() { return "string"; } }; template<> struct get_typename { static const char* name() { return "fc::exception"; } }; - template<> struct get_typename> { static const char* name() { return "std::vector"; } }; - template struct get_typename> - { - static const char* name() { - static std::string n = std::string("std::vector<") + get_typename::name() + ">"; - return n.c_str(); - } + template<> struct get_typename> { static const char* name() { return "std::vector"; } }; + template struct get_typename> + { + static const char* name() { + static std::string n = std::string("std::vector<") + get_typename::name() + ">"; + return n.c_str(); + } }; template struct get_typename> { @@ -54,17 +54,18 @@ namespace fc { }; template struct get_typename, typename static_variant::type_lt>> - { - static const char* name() { + { + static const char* name() { using TN = get_typename>; - static std::string n = std::string("flat_set<") + TN::name() + ", " + TN::name() + "::type_lt>"; - return n.c_str(); - } + static std::string n = std::string("flat_set<") + TN::name() + "," + TN::name() + "::type_lt>"; + return n.c_str(); + } }; template struct get_typename> { static const char* name() { - static std::string n = std::string("flat_map<") + get_typename::name() + ", " + get_typename::name() + ">"; + static std::string n = std::string("flat_map<") + get_typename::name() + "," + get_typename::name() + + ">"; return n.c_str(); } }; @@ -72,23 +73,31 @@ namespace fc { { static const char* name() { - static std::string n = std::string("std::deque<") + get_typename::name() + ">"; - return n.c_str(); + static std::string n = std::string("std::deque<") + get_typename::name() + ">"; + return n.c_str(); + } + }; + template struct get_typename> + { + static const char* name() { + static std::string n = std::string("optional<") + get_typename::name() + ">"; + return n.c_str(); } }; - template struct get_typename> - { - static const char* name() { - static std::string n = std::string("optional<") + get_typename::name() + ">"; - return n.c_str(); - } + template struct get_typename> + { + static const char* name() { + static std::string n = std::string("std::map<") + get_typename::name() + ","+get_typename::name()+">"; + return n.c_str(); + } }; - template struct get_typename> - { - static const char* name() { - static std::string n = std::string("std::map<") + get_typename::name() + ","+get_typename::name()+">"; - return n.c_str(); - } + template struct get_typename>> + { + static const char* name() { + static std::string n = std::string("std::map<") + get_typename::name() + ","+get_typename::name() + + ",std::less<>>"; + return n.c_str(); + } }; template struct get_typename< std::set > { @@ -102,19 +111,20 @@ namespace fc { { static const char* name() { - static std::string n = std::string("std::pair<") + get_typename::name() + "," + get_typename::name() + ">"; + static std::string n = std::string("std::pair<") + get_typename::name() + "," + get_typename::name() + + ">"; return n.c_str(); } - }; - template struct get_typename< std::array > - { - static const char* name() - { + }; + template struct get_typename< std::array > + { + static const char* name() + { static std::string _name = std::string("std::array<") + std::string(fc::get_typename::name()) + "," + fc::to_string(N) + ">"; return _name.c_str(); - } - }; + } + }; template struct get_typename< const T* > { static const char* name()