MostlyHarmless 0.0.1
Loading...
Searching...
No Matches
mostly_harmless::utils::Visitor< Callable > Struct Template Reference

Util for use with std::visit to avoid a bunch of if constexpr(...)s. More...

#include <mostlyharmless_Visitor.h>

Inheritance diagram for mostly_harmless::utils::Visitor< Callable >:

Detailed Description

template<typename... Callable>
struct mostly_harmless::utils::Visitor< Callable >

Util for use with std::visit to avoid a bunch of if constexpr(...)s.

Usage::

std::variant<int, double> data;
std::visit(Visitor{
[](int x) { std::cout << "Was int!\n"; },
[](double x) { std::cout << "Was double!\n"; }
}, data);
Contains classes and functions related to data management.
Definition mostlyharmless_DatabaseState.h:16
Util for use with std::visit to avoid a bunch of if constexpr(...)s.
Definition mostlyharmless_Visitor.h:22
Template Parameters
Callable

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