[Graph] problem with strong_components.hpp and variant

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 } ########### compile error ########### a-lin@a-lin-desktop:~/OpenCog/test/bin$ make [100%] Building CXX object CMakeFiles/test.dir/test.cpp.o In file included from /usr/include/boost/graph/graph_concepts.hpp:17, from /usr/include/boost/graph/depth_first_search.hpp:18, from /usr/include/boost/graph/strong_components.hpp:17, from /home/a-lin/OpenCog/test/test.cpp:2: /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/OpenCog/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 make[2]: *** [CMakeFiles/test.dir/test.cpp.o] Error 1 make[1]: *** [CMakeFiles/test.dir/all] Error 2 make: *** [all] Error 2 Is it a bug? Thanks a lot! Nil

Hi, I resend that email with the right title header. ---------- Forwarded message ---------- From: Nil Geisweiller <ngeiswei@googlemail.com> Date: Sun, Oct 25, 2009 at 6:11 PM Subject: [Graph] problem with strong_components.hpp and variant To: boost@lists.boost.org 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 } ########### compile error ########### a-lin@a-lin-desktop:~/OpenCog/test/bin$ make [100%] Building CXX object CMakeFiles/test.dir/test.cpp.o In file included from /usr/include/boost/graph/graph_concepts.hpp:17, from /usr/include/boost/graph/depth_first_search.hpp:18, from /usr/include/boost/graph/strong_components.hpp:17, from /home/a-lin/OpenCog/test/test.cpp:2: /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/OpenCog/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 make[2]: *** [CMakeFiles/test.dir/test.cpp.o] Error 1 make[1]: *** [CMakeFiles/test.dir/all] Error 2 make: *** [all] Error 2 Is it a bug? Thanks a lot! Nil
participants (1)
-
Nil Geisweiller