On 12/15/06, Richard Crossley
boost::make_recursive_variant< int,std::map
::type var;
Is there a way to do this?
Sure. You've got it.
VC8.1 complains with: utility(54) : error C2079: 'std::pair<_Ty1,_Ty2>::second' uses undefined struct 'boost::recursive_variant_' with [ _Ty1=const float, _Ty2=boost::recursive_variant_ ]
What does your code look like that generates this error? Its not coming from the make_recursive_variant typedef, but some usage of it. You probably need to introduce one or two other typedefs that don't reference the "recursive_variant_" type. See the attached test program that creates a recursive variant like yours, populates it, and prints the contents using a static visitor. -- Caleb Epstein