Inviwo  0.9.10.1
Inviwo documentation
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(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);

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