On Mon, 27 Aug 2012, Jon McCormack wrote:
Hello,I'm trying to use boost 1.51 graph library with Xcode 4.4 and running into problems. While boost will build fine, when I try some simple graph code as per the documentation:
(snip)
I get the following errors: In file included from graph.cpp:4: In file included from /usr/local/include/boost/graph/graph_traits.hpp:26: In file included from /usr/local/include/boost/pending/property.hpp:13: In file included from /usr/local/include/boost/type_traits.hpp:35: In file included from /usr/local/include/boost/type_traits/has_operator.hpp:12: In file included from /usr/local/include/boost/type_traits/has_bit_and.hpp:43: /usr/local/include/boost/type_traits/detail/has_binary_operator.hpp:220:1: error: C++ requires a type specifier for all declarations BOOST_TT_AUX_BOOL_TRAIT_DEF3(BOOST_TT_TRAIT_NAME, Lhs, Rhs=Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, ... ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/include/boost/type_traits/detail/has_binary_operator.hpp:220:30: error: use of undeclared identifier 'has_bit_and' BOOST_TT_AUX_BOOL_TRAIT_DEF3(BOOST_TT_TRAIT_NAME, Lhs, Rhs=Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, ... ^ /usr/local/include/boost/type_traits/has_bit_and.hpp:12:29: note: expanded from macro 'BOOST_TT_TRAIT_NAME' #define BOOST_TT_TRAIT_NAME has_bit_and ^ In file included from graph.cpp:4: In file included from /usr/local/include/boost/graph/graph_traits.hpp:26: In file included from /usr/local/include/boost/pending/property.hpp:13: In file included from /usr/local/include/boost/type_traits.hpp:35: In file included from /usr/local/include/boost/type_traits/has_operator.hpp:12: In file included from /usr/local/include/boost/type_traits/has_bit_and.hpp:43: /usr/local/include/boost/type_traits/detail/has_binary_operator.hpp:220:230: error: expected ';' after top level declarator ...Lhs, Rhs=Lhs, Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::trait_impl < Lhs, Rhs, Ret >::value))
The errors continue for a number of type_traits/detail files. Is this an issue with clang?
I don't see any test failures with type_traits on Clang on URL:http://www.boost.org/development/tests/release/developer/type_traits.htm..., but that may not include the version that you have. In any case, this looks like a Boost.TypeTraits issue, so you might want to try running its test suite (run "./b2 libs/type_traits/test" from the top Boost source directory, adding any toolset flags you normally use). If that fails, you might want to post that as a separate message to boost-users with "[type_traits]" in the subject. -- Jeremiah Willcock