21 Jun
2010
21 Jun
'10
6:25 p.m.
I finally found the solution :
boost::apply_visitor( boost::bind( foo_visitor(), _1, 2.), foo);
Regards,
Olivier
2010/6/21 Olivier Tournaire
Hi all,
How could you I use bind with apply_visitor?
#include
#include struct foo_visitor : public boost::static_visitor<> { template <typename Type> result_type operator()(const Type& data, double d) const { return /**/; } };
int main (int argc, char** argv) { boost::variant
foo; boost::apply_visitor( boost::bind( &foo_visitor, 2.), foo); // here? return 0; } Hope you could help
Regards,
Olivier