Utility wrappers and containers¶
-
class
unique_any¶ A container for a single value of any type that is move constructable. Used in the Arbor API where a type of a value passed to or from the API is decided at run time.
-
class
any_ptr¶ Holds a pointer to an arbitrary type, together with the type information.
-
template<typename
T>
Tas()¶ Retrieve the pointer as type T. If T is
void *or the same as the type of the pointer stored inany_ptr, return the held value, cast accordingly. Otherwise returnnullptr.
any_ptrcan be used withutil::any_cast, so thatutil::any_cast<T>(p)is equivalent top.as<T>()for a valuepof typeany_ptr.-
template<typename
-
template<typename
T>any_cast(...)¶ Equivalent to
std::any_castforstd::anyarguments,any_castalso performs analogous casting for theunique_anyandany_ptrutility classes.See Cable cells.