Boost logo

Boost :

Subject: Re: [boost] [BGL] [variant] problem (and perhaps solution?) with strong_components.hpp and variant
From: John Bartholomew (jpa.bartholomew_at_[hidden])
Date: 2009-11-17 11:47:10


I can confirm I also get this error, both with the minimal test case you
provided, and in the real code-base that I'm using/working on at the moment.
This is currently preventing me from upgrading to Boost 1.40.

John B

Nil Geisweiller wrote:
> It is weird, I tried with 2 settings
>
> Ubuntu 9.04, gcc-4.3.3, boost 1.40
> Ubuntu 9.10, gcc-4.4.1, boost 1.40
>
> And I get the compiling errors:
>
> /usr/include/boost/property_map/property_map.hpp: In instantiation of
> ‘boost::property_traits<int>’:
> /usr/include/boost/graph/two_bit_color_map.hpp:46: instantiated from
> ‘boost::two_bit_color_map<int>’
> /home/a-lin/Sources/test/test.cpp:10: instantiated from here
> /usr/include/boost/property_map/property_map.hpp:31: error: ‘int’ is
> not a class, struct, or union type
> /usr/include/boost/property_map/property_map.hpp:32: error: ‘int’ is
> not a class, struct, or union type
> /usr/include/boost/property_map/property_map.hpp:33: error: ‘int’ is
> not a class, struct, or union type
> /usr/include/boost/property_map/property_map.hpp:34: error: ‘int’ is
> not a class, struct, or union type
>
> Has anyone experienced problem too?
>
> Thanks
> Nil
>
>
> On Thu, Oct 29, 2009 at 4:07 PM, Jeffrey Hellrung <jhellrung_at_[hidden]> wrote:
>> Nil Geisweiller wrote:
>>>> Hi,
>>>>
>>>> it seems there is a conflict between strong_components.hpp and
>>>> variant, maybe the method boost::get is wrongly overloaded.
>>>>
>>>> The problem occurs with 1.40 but not with 1.37, and it is still occurs
>>>> with the last svn.
>>>>
>>>> I attach a minimal code to reproduce the bug + compile error
>>>>
>>>> ######
>>>> test.cpp
>>>> ######
>>>>
>>>> //uncomment the line below to get the bug
>>>> #include <boost/graph/strong_components.hpp>
>>>> #include <boost/variant.hpp>
>>>>
>>>> typedef boost::variant < int, float > intorfloat;
>>>>
>>>> int main() {
>>>> int i(2);
>>>> intorfloat iof(i);
>>>> return boost::get<int>(iof); //problem is here
>>>> }
>>>>
>> Works for me :/ MSVC 2008, Vista, Boost 1.40.
>>
>> - Jeff
>>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost
>>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


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