Boost logo

Boost :

From: Richard Crossley (rdc_at_[hidden])
Date: 2006-12-27 20:01:16


Cross posted from the boost users list... Can anyone help me out here?

http://thread.gmane.org/gmane.comp.lib.boost.user/23608/focus=23608

Regards,

Richard.

>-----Original Message-----
>From: boost-users-bounces_at_[hidden] [mailto:boost-users-
>bounces_at_[hidden]] On Behalf Of Richard Crossley
>Sent: 19 December 2006 21:32
>To: boost-users_at_[hidden]
>Subject: Re: [Boost-users] [variant] make_recursive_variant and std::map
>
>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<float, element, std::less<float>,
>std::allocator<std::pair<const float, element>>, false>]"
>
>Regards,
>
>Richard.
>
>
>>-----Original Message-----
>>From: boost-users-bounces_at_[hidden] [mailto:boost-users-
>>bounces_at_[hidden]] On Behalf Of Caleb Epstein
>>Sent: 18 December 2006 15:14
>>To: boost-users_at_[hidden]
>>Subject: Re: [Boost-users] [variant] make_recursive_variant and
>std::map
>>
>>On 12/15/06, Richard Crossley <rdc_at_[hidden]> wrote:
>>
>>> boost::make_recursive_variant<
>>> int,std::map<float,boost::recursive_variant_>
>>> >::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
>
>
>_______________________________________________
>Boost-users mailing list
>Boost-users_at_[hidden]
>http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk