BioC++ core-0.7.0
The Modern C++ libraries for Bioinformatics.
 
Loading...
Searching...
No Matches
bio::meta::overloaded< functors > Struct Template Reference

Wrapper to create an overload set of multiple functors. More...

#include <bio/meta/overloaded.hpp>

+ Inheritance diagram for bio::meta::overloaded< functors >:

Related Functions

(Note that these are not member functions.)

template<typename... functors>
 overloaded (functors...) -> overloaded< functors... >
 Deduction guide for bio::meta::overloaded.
 

Detailed Description

template<typename... functors>
struct bio::meta::overloaded< functors >

Wrapper to create an overload set of multiple functors.

Template Parameters
functorsThe types of the functors (usually deduced).

This helper allows creating a function object that statically dispatches between other function objects (usually provided via lambda expressions).

Example

#include <string>
#include <fmt/core.h>
int main()
{
[] (std::string const & s) { fmt::print("I am a string:{}\n", s); },
[] (std::integral auto const i) { fmt::print("I am an int: {}\n", i); }
};
fn("foobar"); // picks first "overload"
fn(3); // picks second "overload"
}
Provides bio::meta::overloaded.
Wrapper to create an overload set of multiple functors.
Definition: overloaded.hpp:37

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