Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::util::overloaded< Ts > Struct Template Reference

#include <stdextensions.h>

+ Inheritance diagram for inviwo::util::overloaded< Ts >:

Detailed Description

template<class... Ts>
struct inviwo::util::overloaded< Ts >

Helper struct to allow passing multiple lambda expressions to std::visit. Example useage:

std::variant<int, std::string, float, double> data = ...;
std::visit(util::overloaded{[](const int& arg) { }, // called if data contains an int
[](const std::string &arg) { }, // called if data contains a string
[](const auto& arg) { }} // use auto to capture "the other types"
, data);
Definition stdextensions.h:136

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