Boost logo

Boost Users :

From: Caleb Epstein (caleb.epstein_at_[hidden])
Date: 2006-12-18 10:13:46


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 list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net