8#include <unordered_map>
18 static std::string
ToString(
const std::any& value);
25 static void RegisterType(
const std::type_index& index,
const std::function<std::string(
const std::any&)>& f);
28 static void RegisterType(
const std::function<std::string(
const std::any&)>& f)
35 static std::unordered_map<std::type_index, std::function<std::string(
const std::any&)>>
registered_types;
static std::unordered_map< std::type_index, std::function< std::string(const std::any &)> > registered_types
Maps std::type_index of a std::any to a function to convert it to std::string.
static void RegisterType(const std::function< std::string(const std::any &)> &f)
static std::string ToString(const std::any &value)
Give a string representation of a std::any value.
static std::string DefaultToString(const std::any &value)
Default function to convert all unregistered.
static void RegisterType(const std::type_index &index, const std::function< std::string(const std::any &)> &f)