Boost logo

Boost Users :

Subject: Re: [Boost-users] recursive_variant map recursion / incomplete type error
From: ÇÇ־ǿ (qiaozhiqiang_at_[hidden])
Date: 2011-11-17 19:57:05


try

#define BOOST_VARIANT_NO_FULL_RECURSIVE_VARIANT_SUPPORT

MSVC++ 2010 and gcc maybe need this.

------------------------------

Message: 4
Date: Thu, 17 Nov 2011 11:10:27 +0100
From: "Bodmer Marc" <Marc.Bodmer_at_[hidden]>
To: <boost-users_at_[hidden]>
Subject: [Boost-users] recursive_variant map recursion / incomplete
        type error
Message-ID:
        <0456E5B751F6DB4A83688EED49C9CAF70E101094_at_CHNIS191.bystronic.metal.firm>
        
Content-Type: text/plain; charset="utf-8"

Hi

I try to use boost::recursive_variant with a recursive std::map.

There are several projects and examples on the internet using boost::recursive_variant exactly like I do and it seems to work there.

But somehow I can not make it compile in my environment. I am using gcc
4.6.1 and boost 1.46.1.

I've stripped my code down to this:
-------------------------------------------------------------
#include <boost/variant.hpp>
#include <map>

typedef boost::make_recursive_variant<
    int,
    std::map<float, boost::recursive_variant_>
>::type element;

int main ()
{
    element i = 42;
}


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