|
Clio
develop
The XRP Ledger API server.
|
A wrapper for std::any used as the type-erased transport for async operation results. More...
#include <Any.hpp>
Public Member Functions | |
| Any (Any const &)=default | |
| Any (Any &&)=default | |
| Any (auto &&v) | |
| operator std::any & () noexcept | |
A wrapper for std::any used as the type-erased transport for async operation results.
It exists to work around a recursive-constraint failure in libstdc++'s <expected> when the value type is a raw std::any: std::any's greedy templated constructor makes std::expected<std::any, E> ask whether std::any is constructible from std::expected<std::any, E>, which re-enters the same constraint. Newer Clang rejects this as self-referential.
Any only allows construction from std::any (never from an expected), which breaks the cycle while still allowing transparent unwrapping back to std::any&.