Bitcoin Core  24.99.0
P2P Digital Currency
util::Overloaded< Ts > Struct Template Reference

Overloaded helper for std::visit. More...

#include <overloaded.h>

Inheritance diagram for util::Overloaded< Ts >:
Collaboration diagram for util::Overloaded< Ts >:

Detailed Description

template<class... Ts>
struct util::Overloaded< Ts >

Overloaded helper for std::visit.

This helper and std::visit in general are useful to write code that switches on a variant type. Unlike if/else-if and switch/case statements, std::visit will trigger compile errors if there are unhandled cases.

Implementation comes from and example usage can be found at

Definition at line 16 of file overloaded.h.

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