id summary reporter owner description type status milestone component version severity resolution keywords cc 4642 Including some BGL header files and boost/range/irange.hpp causes compile errors due to the name conflict Naoki Yoshioka Andrew Sutton "Some BGL headers like boost/graph/detail/adjacency_list.hpp include boost/pending/integer_range.hpp and use a class template boost::integer_range to represent a vertex/edge list. Since 1.44.0, however, Boost.Range supports a class template which has the same name and probably the same role in boost/range/irange.hpp; it didn't have integer_range and instead used boost::iterator_range > in 1.43.0. Therefore the following simple code causes compile errors using 1.44.0. {{{ // test.cpp #include #include int main() { return 0; } }}} The errors are as follows; {{{ $ g++ --version g++ (Ubuntu 4.4.3-4ubuntu5) 4.4.3 Copyright (C) 2009 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ g++ test.cpp -I/usr/local/include/boost_1_44_0 In file included from test.cpp:2: /usr/local/include/boost_1_44_0/boost/range/irange.hpp:176: error: redefinition of ‘class boost::integer_range’ /usr/local/include/boost_1_44_0/boost/pending/integer_range.hpp:23: error: previous definition of ‘class boost::integer_range’ $ g++ test.cpp -I/usr/local/include/boost_1_43_0 $ }}} Note that /usr/local/include/boost_1_xx_x is the directory the boost 1.xx.x is installed. To fix this problem, I think it's OK just to replace the including file from boost/pending/integer_range.hpp to boost/range/irange.hpp in BGL. The header files which include boost/pending/integer_range.hpp are as follows; * boost/graph/adjacency_matrix.hpp * boost/graph/detail/adjacency_list.hpp * boost/graph/edge_list.hpp * boost/graph/vector_as_graph.hpp Note that I haven't checked whether this modification works completely well or not. I've just checked the above example code works after this modification. After this modification, I think boost/pending/integer_range.hpp can be removed from the boost library because no other files include this pending header file." Bugs closed To Be Determined graph Boost 1.44.0 Problem fixed Jeremiah Willcock Neil Groves Dave Abrahams jsiek