
14 Jun
2011
14 Jun
'11
3:23 p.m.
What is the correct way of getting several character arrays into a variant: // This doesn't work typedef boost::variant<int,char[256],char[8192]> MyType; // This does, but seems like a lot of work template <int len> struct MyChar { char val_[len]; }; typedef boost::variant<int,MyChar<256>,MyChar<8192> > MyType; What is the best way to do this? Thanks, Michael Goldshteyn