compilation fails with clang on OS X
I get this error trying to compile 2.2.20 on OS X 10.8 using the latest Xcode-provided version of clang:
In file included from graph_blockmodel.cc:38:
In file included from ./graph_blockmodel.hh:35:
In file included from /opt/local/include/sparsehash/dense_hash_set:110:
In file included from /usr/include/c++/4.2.1/tr1/functional:43:
In file included from /usr/include/c++/4.2.1/tr1/tuple:39:
/usr/include/c++/4.2.1/tr1/utility:48:12: error: explicit specialization of non-template struct 'tuple_size'
struct tuple_size<std::pair<_Tp1, _Tp2> >
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/4.2.1/tr1/utility:52:25: error: expected ';' after top level declarator
const int tuple_size<std::pair<_Tp1, _Tp2> >::value;
^
/usr/include/c++/4.2.1/tr1/utility:55:12: error: explicit specialization of non-template struct 'tuple_element'
struct tuple_element<0, std::pair<_Tp1, _Tp2> >
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/4.2.1/tr1/utility:59:12: error: explicit specialization of non-template struct 'tuple_element'
struct tuple_element<1, std::pair<_Tp1, _Tp2> >
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/4.2.1/tr1/utility:90:22: error: expected a qualified name after 'typename'
inline typename tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&
^
/usr/include/c++/4.2.1/tr1/utility:90:35: error: expected ';' after top level declarator
inline typename tuple_element<_Int, std::pair<_Tp1, _Tp2> >::type&
^
In file included from graph_blockmodel.cc:38:
In file included from ./graph_blockmodel.hh:35:
In file included from /opt/local/include/sparsehash/dense_hash_set:110:
In file included from /usr/include/c++/4.2.1/tr1/functional:43:
In file included from /usr/include/c++/4.2.1/tr1/tuple:106:
In file included from /usr/include/c++/4.2.1/tr1/tuple_defs.h:37:
In file included from /usr/include/c++/4.2.1/tr1/repeat.h:647:
/usr/include/c++/4.2.1/tr1/tuple_defs.h:48:32: error: expected a qualified name after 'typename'
typename __add_ref<typename tuple_element<__i, tuple<_GLIBCXX_TEMPLATE_ARGS> >::type>::type
^
/usr/include/c++/4.2.1/tr1/tuple_defs.h:48:32: error: unknown type name 'tuple_element'
/usr/include/c++/4.2.1/tr1/tuple_defs.h:48:81: error: expected unqualified-id
typename __add_ref<typename tuple_element<__i, tuple<_GLIBCXX_TEMPLATE_ARGS> >::type>::type
^
In file included from graph_blockmodel.cc:38:
In file included from ./graph_blockmodel.hh:35:
In file included from /opt/local/include/sparsehash/dense_hash_set:110:
In file included from /usr/include/c++/4.2.1/tr1/functional:43:
In file included from /usr/include/c++/4.2.1/tr1/tuple:155:
In file included from /usr/include/c++/4.2.1/tr1/repeat.h:74:
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:43:21: error: reference to 'tuple' is ambiguous
struct tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >
^
/opt/local/include/boost/tr1/tuple.hpp:63:24: note: candidate found by name lookup is 'std::tr1::tuple'
using ::boost::fusion::tuple;
^
/usr/include/c++/4.2.1/tr1/tuple_defs.h:43:56: note: candidate found by name lookup is 'std::tr1::tuple'
template<_GLIBCXX_TEMPLATE_PARAMS_NULL_CLASS> class tuple;
^
In file included from graph_blockmodel.cc:38:
In file included from ./graph_blockmodel.hh:35:
In file included from /opt/local/include/sparsehash/dense_hash_set:110:
In file included from /usr/include/c++/4.2.1/tr1/functional:43:
In file included from /usr/include/c++/4.2.1/tr1/tuple:155:
In file included from /usr/include/c++/4.2.1/tr1/repeat.h:74:
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:43:49: error: expected expression
struct tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >
^
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:43:10: error: explicit specialization of non-template struct 'tuple_size'
struct tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >
^
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:43:10: error: reference to 'tuple_size' is ambiguous
struct tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >
^
/opt/local/include/boost/tr1/tuple.hpp:72:24: note: candidate found by name lookup is 'std::tr1::tuple_size'
using ::boost::fusion::tuple_size;
^
/usr/include/c++/4.2.1/tr1/utility:43:29: note: candidate found by name lookup is 'std::tr1::tuple_size'
template<class _Tp> class tuple_size;
^
In file included from graph_blockmodel.cc:38:
In file included from ./graph_blockmodel.hh:35:
In file included from /opt/local/include/sparsehash/dense_hash_set:110:
In file included from /usr/include/c++/4.2.1/tr1/functional:43:
In file included from /usr/include/c++/4.2.1/tr1/tuple:155:
In file included from /usr/include/c++/4.2.1/tr1/repeat.h:74:
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:43:51: error: expected unqualified-id
struct tuple_size<tuple<_GLIBCXX_TEMPLATE_ARGS> >
^
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:55:9: error: explicit specialization of non-template class 'tuple'
class tuple<_GLIBCXX_TEMPLATE_ARGS>
^ ~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:121:20: error: redefinition of 'tuple' as different kind of symbol
friend class tuple;
^
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:55:9: note: previous definition is here
class tuple<_GLIBCXX_TEMPLATE_ARGS>
^
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:129:42: error: expected a qualified name after 'typename'
static typename __add_ref<typename tuple_element<_GLIBCXX_NUM_ARGS,
^
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:129:42: error: unknown type name 'tuple_element'
/usr/include/c++/4.2.1/tr1/tuple_iterate.h:130:62: error: definition or redeclaration of 'type' cannot name the global scope
_Tp>::type>::type
~~^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[4]: *** [graph_blockmodel.lo] Error 1