No joy.
With your code I get exactly the same error. This is VC8 with SP1 installed
and using cvs head.
Trying with Intel 9.1 I see the same problem.
C:\Program Files\Microsoft Visual Studio 8\VC\include\utility(54): error:
incomplete type is not allowed
_Ty2 second; // the second stored value
^
detected during:
instantiation of class "std::pair<_Ty1, _Ty2> [with _Ty1=const
float, _Ty2=boost::recursive_variant_]" at line 258 of "C:\Program
Files\Microsoft Visual Studio 8\VC\include\xtree"
instantiation of "std::_Tree<_Traits>::_Ctptr
std::_Tree<_Traits>::const_iterator::operator->() const [with
_Traits=std::_Tmap_traits
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users- bounces@lists.boost.org] On Behalf Of Caleb Epstein Sent: 18 December 2006 15:14 To: boost-users@lists.boost.org Subject: Re: [Boost-users] [variant] make_recursive_variant and std::map
On 12/15/06, Richard Crossley
wrote: 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