In my previous article, “visiting variants using lambdas - part 1”, I wrote about a simple technique (using boost::hana
) that allows variant visitation using lambdas.
The technique consisted in passing several lambdas to boost::hana::overload
in order to create a “local” visitor, without having to define a class
/struct
.