Boost logo

Boost :

Subject: Re: [boost] [BGL] [variant] problem (and perhaps solution?) with strong_components.hpp and variant
From: Jeffrey Hellrung (jhellrung_at_[hidden])
Date: 2009-10-29 10:07:06


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


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