
10 Apr
2008
10 Apr
'08
6:05 a.m.
Thank you Jeffrey.
typedef boost::variant
double_variant; typedef boost::tuple double_tuple; ... std::ostream& operator<<( std::ostream& os, const double_variant& p ) { output_visitor out_v(os); boost::apply_visitor(out_v,p); return os; } ... This works, but is there a generic way without global typedefs?
You don't have to use the typedefs. Just replace double_variant with boost::variant
and double_tuple with boost::tuple . Is that what you were asking?
Yep, after reading this, it was so clear ;-) Thanks, Olaf