graph-tool 2.2.26 doesn't compile with "clang-3.3 -stdlib=libc++"
On OS X 10.9 MacPorts switched the default C++ library to be LLVM's libc++ rather than libstdc++. I tried to compile the latest release of graph-tool with both the version of clang that comes with Xcode and the official clang 3.3 release. I run into these errors when using the libc++ library:
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
Making all in src
Making all in graph
Making all in centrality
/bin/sh ../../../libtool --tag=CXX --mode=compile /opt/local/bin/clang++-mp-3.3 -DHAVE_CONFIG_H -I. -I../../.. -I. -I./.. -I./../../boost-workaround -DHAVE_CONFIG_H -I/opt/local/include -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m/.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/numpy/core/include/numpy -Wall -Wextra -Wno-unused-local-typedefs -Wno-unused-parameter -pipe -Os -arch x86_64 -stdlib=libc++ -ftemplate-depth-150 -Wno-deprecated -Wno-unknown-pragmas -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-unknown-pragmas -MT graph_betweenness.lo -MD -MP -MF .deps/graph_betweenness.Tpo -c -o graph_betweenness.lo graph_betweenness.cc
libtool: compile: /opt/local/bin/clang++-mp-3.3 -DHAVE_CONFIG_H -I. -I../../.. -I. -I./.. -I./../../boost-workaround -DHAVE_CONFIG_H -I/opt/local/include -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m/.. -I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/include/python3.3m -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages/numpy/core/include/numpy -Wall -Wextra -Wno-unused-local-typedefs -Wno-unused-parameter -pipe -Os -arch x86_64 -stdlib=libc++ -ftemplate-depth-150 -Wno-deprecated -Wno-unknown-pragmas -O3 -fvisibility=default -fvisibility-inlines-hidden -Wno-unknown-pragmas -MT graph_betweenness.lo -MD -MP -MF .deps/graph_betweenness.Tpo -c graph_betweenness.cc -fno-common -DPIC -o .libs/graph_betweenness.o
warning: unknown warning option '-Wno-unused-local-typedefs' [-Wunknown-warning-option]
In file included from graph_betweenness.cc:18:
In file included from ./../graph_filtering.hh:21:
In file included from ./../graph.hh:35:
./../graph_properties.hh:210:42: error: call to 'ref' is ambiguous
(bind<void>(find_name(), _1, ref(type),
^~~
/opt/local/libexec/llvm-3.3/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate function
[with _Tp = const std::type_info]
ref(_Tp& __t)
^
/opt/local/include/boost/ref.hpp:64:63: note: candidate function [with T = const std::type_info]
template<class T> inline reference_wrapper<T> BOOST_REF_CONST ref(T & t)
^
In file included from graph_betweenness.cc:18:
In file included from ./../graph_filtering.hh:21:
In file included from ./../graph.hh:35:
./../graph_properties.hh:262:30: error: reference to 'is_convertible' is ambiguous
return do_convert(v, is_convertible<Type2,Type1>());
^
/opt/local/libexec/llvm-3.3/bin/../lib/c++/v1/type_traits:650:57: note: candidate found by name
lookup is 'std::__1::is_convertible'
template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS is_convertible
^
/opt/local/include/boost/type_traits/is_convertible.hpp:484:30: note: candidate found by name lookup
is 'boost::is_convertible'
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,BOOST_IS_CONVERTIBLE(From,To))
^
/opt/local/include/boost/type_traits/detail/bool_trait_def.hpp:81:45: note: expanded from macro
'BOOST_TT_AUX_BOOL_TRAIT_DEF2'
template< typename T1, typename T2 > struct trait \
^
In file included from graph_betweenness.cc:18:
In file included from ./../graph_filtering.hh:21:
In file included from ./../graph.hh:35:
./../graph_properties.hh:262:45: error: 'Type2' does not refer to a value
return do_convert(v, is_convertible<Type2,Type1>());
^
./../graph_properties.hh:257:30: note: declared here
template <class Type1, class Type2>
^
./../graph_properties.hh:307:17: error: reference to 'is_same' is ambiguous
if (is_same<T1, uint8_t>::value)
^
/opt/local/libexec/llvm-3.3/bin/../lib/c++/v1/type_traits:329:57: note: candidate found by name
lookup is 'std::__1::is_same'
template <class _Tp, class _Up> struct _LIBCPP_TYPE_VIS is_same : public false_type {};
^
/opt/local/include/boost/type_traits/is_same.hpp:37:30: note: candidate found by name lookup is
'boost::is_same'
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false)
^
/opt/local/include/boost/type_traits/detail/bool_trait_def.hpp:81:45: note: expanded from macro
'BOOST_TT_AUX_BOOL_TRAIT_DEF2'
template< typename T1, typename T2 > struct trait \
^
In file included from graph_betweenness.cc:18:
In file included from ./../graph_filtering.hh:21:
In file included from ./../graph.hh:35:
./../graph_properties.hh:307:25: error: 'T1' does not refer to a value
if (is_same<T1, uint8_t>::value)
^
./../graph_properties.hh:301:21: note: declared here
template <class T1>
^
./../graph_properties.hh:320:17: error: reference to 'is_same' is ambiguous
if (is_same<T2, uint8_t>::value)
^
/opt/local/libexec/llvm-3.3/bin/../lib/c++/v1/type_traits:329:57: note: candidate found by name
lookup is 'std::__1::is_same'
template <class _Tp, class _Up> struct _LIBCPP_TYPE_VIS is_same : public false_type {};
^
/opt/local/include/boost/type_traits/is_same.hpp:37:30: note: candidate found by name lookup is
'boost::is_same'
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false)
^
/opt/local/include/boost/type_traits/detail/bool_trait_def.hpp:81:45: note: expanded from macro
'BOOST_TT_AUX_BOOL_TRAIT_DEF2'
template< typename T1, typename T2 > struct trait \
^
In file included from graph_betweenness.cc:18:
In file included from ./../graph_filtering.hh:21:
In file included from ./../graph.hh:35:
./../graph_properties.hh:320:25: error: 'T2' does not refer to a value
if (is_same<T2, uint8_t>::value)
^
./../graph_properties.hh:314:21: note: declared here
template <class T2>
^
./../graph_properties.hh:377:49: error: call to 'ref' is ambiguous
(bind<void>(choose_converter(), _1, ref(pmap), ref(converter)));
^~~
/opt/local/libexec/llvm-3.3/bin/../lib/c++/v1/__functional_base_03:1058:1: note: candidate function
[with _Tp = boost::any]
ref(_Tp& __t)
^
/opt/local/include/boost/ref.hpp:64:63: note: candidate function [with T = boost::any]
template<class T> inline reference_wrapper<T> BOOST_REF_CONST ref(T & t)
^
In file included from graph_betweenness.cc:18:
In file included from ./../graph_filtering.hh:21:
In file included from ./../graph.hh:35:
./../graph_properties.hh:417:33: error: reference to 'is_convertible' is ambiguous
is_convertible<typename property_traits<PropertyMap>::category,
^
/opt/local/libexec/llvm-3.3/bin/../lib/c++/v1/type_traits:650:57: note: candidate found by name
lookup is 'std::__1::is_convertible'
template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS is_convertible
^
/opt/local/include/boost/type_traits/is_convertible.hpp:484:30: note: candidate found by name lookup
is 'boost::is_convertible'
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,BOOST_IS_CONVERTIBLE(From,To))
^
/opt/local/include/boost/type_traits/detail/bool_trait_def.hpp:81:45: note: expanded from macro
'BOOST_TT_AUX_BOOL_TRAIT_DEF2'
template< typename T1, typename T2 > struct trait \
^
In file included from graph_betweenness.cc:18:
In file included from ./../graph_filtering.hh:21:
In file included from ./../graph.hh:35:
./../graph_properties.hh:417:95: error: expected '(' for function-style cast or type construction
is_convertible<typename property_traits<PropertyMap>::category,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
./../graph_properties.hh:424:34: error: reference to 'is_convertible' is ambiguous
is_convertible<typename property_traits<PropertyMap>::category,
^
/opt/local/libexec/llvm-3.3/bin/../lib/c++/v1/type_traits:650:57: note: candidate found by name
lookup is 'std::__1::is_convertible'
template <class _T1, class _T2> struct _LIBCPP_TYPE_VIS is_convertible
^
/opt/local/include/boost/type_traits/is_convertible.hpp:484:30: note: candidate found by name lookup
is 'boost::is_convertible'
BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,BOOST_IS_CONVERTIBLE(From,To))
^
/opt/local/include/boost/type_traits/detail/bool_trait_def.hpp:81:45: note: expanded from macro
'BOOST_TT_AUX_BOOL_TRAIT_DEF2'
template< typename T1, typename T2 > struct trait \
^
In file included from graph_betweenness.cc:18:
In file included from ./../graph_filtering.hh:21:
In file included from ./../graph.hh:35:
./../graph_properties.hh:424:96: error: expected '(' for function-style cast or type construction
is_convertible<typename property_traits<PropertyMap>::category,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
./../graph_properties.hh:536:5: error: unknown type name 'shared_ptr'
shared_ptr<map_t> _base_map;
^
./../graph_properties.hh:536:15: error: expected member name or ';' after declaration specifiers
shared_ptr<map_t> _base_map;
~~~~~~~~~~^
./../graph_properties.hh:529:11: error: member initializer '_base_map' does not name a non-static
data member or base class
: _base_map(new map_t(0, hashfc_t(index_map))), _prop_map(*_base_map) {}
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./../graph_properties.hh:529:68: error: use of undeclared identifier '_base_map'
: _base_map(new map_t(0, hashfc_t(index_map))), _prop_map(*_base_map) {}
^
In file included from graph_betweenness.cc:18:
In file included from ./../graph_filtering.hh:21:
./../graph.hh:177:5: error: unknown type name 'shared_ptr'
shared_ptr<multigraph_t> _mg;
^
./../graph.hh:177:15: error: expected member name or ';' after declaration specifiers
shared_ptr<multigraph_t> _mg;
~~~~~~~~~~^
./../graph.hh:89:34: error: use of undeclared identifier '_mg'
void SetKeepEpos(bool keep) {_mg->set_keep_epos(keep);}
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make[4]: *** [graph_betweenness.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2