parcel 0.2.2
Wrappable, wire-transferable C++23 value system with JSON serialization
Loading...
Searching...
No Matches
parcel::Overload< Fs > Struct Template Reference

Lambda-overload set helper for parcel::visit. More...

#include <union.h>

Inherits parcel::Fs.

Detailed Description

template<class... Fs>
struct parcel::Overload< Fs >

Lambda-overload set helper for parcel::visit.

Standard CTAD trick that turns a brace-enclosed list of lambdas into one callable whose operator() is overloaded across them. Pair with parcel::visit over a UnionCell to dispatch on the active alternative.

[](std::int32_t i) { ... },
[](std::string const& s) { ... },
}, my_union);
Lambda-overload set helper for parcel::visit.
Definition union.h:561
decltype(auto) visit(F &&f, UnionCell< Ts... > &u)
std::visit-style free function over UnionCell<Ts...>.
Definition union.h:487

The documentation for this struct was generated from the following file: