Celeritas  0.5.0-57+aeecb15
celeritas::Overload< Ts > Struct Template Reference

Helper class for dispatching type-specific lambdas. More...

#include <VariantUtils.hh>

Inheritance diagram for celeritas::Overload< Ts >:
Inheritance graph
[legend]

Detailed Description

template<typename... Ts>
struct celeritas::Overload< Ts >

Helper class for dispatching type-specific lambdas.

Example applied to a variant that converts to int or string:

std::visit(Overload{[](int a) { cout << a + 2; },
[](std::string const& s) { cout << '"' << s << '"'; }},
my_variant);

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