According to http://www.boost.org/doc/libs/1_52_0/doc/html/boost/apply_visitor.html, the actual type is apply_visitor_delayed_t<times_two_generic>
.
Since it is just another function object, you could also use std::function
, but that would cost more than using the real type.