Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
util::async::impl::Any Class Reference

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

Detailed Description

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&.


The documentation for this class was generated from the following file:
  • /__w/clio/clio/src/util/async/impl/Any.hpp