Closed tower120 closed 7 years ago
Note 1: visitor is limited to always return a Variant (just above this).
nonstd::visit( [&](auto&& e){ return v; }, v );
Due to pre-C++17 language limitations (or mine), variant-lite's visitor must return the variant.
This is non standart-compatible behaviour. But I understood you.
The following code does not compiles in Visual Studio 2017: