|
Any++
|
Proxies manage the storage in an any. More...
Classes | |
| struct | anyxx::unique |
| union | anyxx::val |
| Proxy to manage the captured object as value with small object optimization. More... | |
Typedefs | |
| template<template< typename > typename Any, is_proxy Proxy, typename... Types> | |
| using | anyxx::vany_variant = std::variant<Any<Proxy>, Types...> |
| using | anyxx::cref = observer<const_void> |
| using | anyxx::mutref = observer<mutable_void> |
| using | anyxx::shared = std::shared_ptr<void const> |
| using | anyxx::weak = std::weak_ptr<void const> |
Proxies manage the storage in an any.
| using anyxx::cref = observer<const_void> |
Proxy to capture the dispatch target type erased by const reference An any with such a proxy is lifetime bound to the object referenced!
| using anyxx::mutref = observer<mutable_void> |
Proxy to capture the dispatch target type erased by mutable reference An any with such a proxy is lifetime bound to the object referenced!
| using anyxx::shared = std::shared_ptr<void const> |
Proxy to manage the captured object via std::shared_ptr.
std::shared_ptr to the any constructor, this pointer will be casted to <const void*> and used as proxy.| using anyxx::vany_variant = std::variant<Any<Proxy>, Types...> |
A Proxy for mixing std::variant and type erasure Use this when some, at compile time, known types are dispatched in a hot path. Put these types plus an any (with the specific trait and a dynamic proxy) in a std::variant. This variant is then used with a using_ proxy and the same trait as before. See make_vany So the dispatch for the types in the variant is done internally with a std::visit, and all other types are dispatched via their v-Table. Now you know where the Any++ logo has its origin.
| using anyxx::weak = std::weak_ptr<void const> |
Proxy to manage the captured object via std::weak_ptr. Assign or copy construct it from a any<shared>