xieite ::visitor {}
Defined in header <xieite/fn/visitor.hpp>
Derives from multiple functors and inherits their call operators.
Definition
template <typename... Fns >struct visitor :Fns ... {using Fns ::operator ()...; };template <typename... Fns >visitor (Fns ...) ->visitor <Fns ...>;
Example
Output:int main () {auto f =xieite ::visitor ( [](int ) {std ::puts ("a" ); }, [](double ) {std ::puts ("b" ); }, [](bool ) {std ::puts ("c" ); } );f (3.14159 ); }
[View in Compiler Explorer]b