BenBot 1.7.5
A chess engine
Loading...
Searching...
No Matches
util::Visitor< Callable > Struct Template Referencefinal

#include </home/runner/work/BenBot/BenBot/libutil/include/libutil/Variant.hpp>

Inheritance diagram for util::Visitor< Callable >:
Collaboration diagram for util::Visitor< Callable >:

Detailed Description

template<typename... Callable>
struct util::Visitor< Callable >

A handy utility to make using std::visit a bit easier.

Example usage:

std::variant<int, float, double> data;
std::visit(
[](int i){ std::println("Integer value: {}", i); },
[](float f){ std::println("Float value: {}", f); },
[](double d){ std::println("Double value: {}", d); }
},
data
);

Definition at line 43 of file Variant.hpp.


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