
22 Jun
2008
22 Jun
'08
10:50 p.m.
if you know the set of types you operate on consider using boost::variant which supports visitor pattern for dispatching of currently stored type.
Besides, if I'm not mistaken, there already exists operator << for boost::variant (which internally performs the visiting)...