Released some time ago new C++11 standard introduced lambda functions - long anticipated and exciting feature. On the other hand, boost::variant has been around for awhile and is used successfully in many projects. The recommended and type-safe way of applying type-specific logic to values of variant types is using visitor pattern. However, a visitor is a functor, which until now should have been defined separately, in a class of its …
more »