C++17: The two line visitor explained--Marius Elvert
The power of C++17.
C++17: The two line visitor explained
by Marius Elvert
From the article:
If you have ever used an “idiomatic” C++ variant datatype like Boost.Variant or the new C++17 std::variant, you probably wished you could assemble a visitor to dispatch on the type by assembling a couple of lambda expressions like this:
auto my_visitor = visitor{ [&](int value) { /* ... */ }, [&](std::string const& value) { /* ... */ }, };

Boost 1.67 is now available:
ACCU’s Overload journal of April 2018 is out. It contains the following C++ related articles.