8extern std::unordered_map<std::type_index, std::function<std::string(
xtd::any const&)>> __any_stringer__;
10template<
class type_t,
class function_t>
11inline std::pair<
const std::type_index, std::function<std::string(
xtd::any const&)>> __to_any_stringer__(function_t
const& func) {
13 std::type_index(
typeid(type_t)),
15 if constexpr(std::is_void_v<type_t>)
return f();
37 template<
class type_t,
class function_t>
40 __any_stringer__.insert(__to_any_stringer__<type_t>(
func));
xtd::delegate< result_t(arguments_t... arguments)> func
Represents a delegate that has variables parameters and returns a value of the type specified by the ...
Definition func.hpp:27
void unregister_any_stringer()
Unregister an any stringer method for a specified type.
Definition unregister_any_stringer.hpp:33
void register_any_stringer(const function_t &func)
Register an any stringer method for a specified type.
Definition register_any_stringer.hpp:38
std::any any
Represents the any alias on std::any.
Definition any.hpp:24
type_t any_cast(const xtd::any &operand)
Performs type-safe access to the contained object.
Definition any_cast.hpp:22
@ f
The F key.
Definition console_key.hpp:98
Contains xtd::collections::generic::key_value_pair <key_t, value_t> struct.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::register_any_stringer and xtd::unregister_any_stringer method.