
23 Jun
2008
23 Jun
'08
12:50 a.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)...