[Lemon-user] lemon and Clang

Zenna Tavares zennatavares at gmail.com
Mon Apr 9 15:36:31 CEST 2012


Does anyone have experience compiling code that using lemon with Clang?

I get many compile erros.   The first of which is given below.

I am compiling with -std=c++11 and -stdlib+libc++ , which may be the
problem since errors are arising in type_traits.
Given that, I can compile fine in g++ with -std=gnu++0x

/usr/local/include/lemon/bits/alteration_notifier.h:196:42: error: no
type named 'iterator' in
      'std::__1::list<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *,
      std::__1::allocator<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *> >'
      typename std::list<ObserverBase*>::iterator _index;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/usr/include/c++/v1/type_traits:1889:54: note: in instantiation of member class
      'lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase' requested here
decltype(_VSTD::move(_Tp(_VSTD::declval<_Args>()...)), true_type())
                                                     ^
/usr/include/c++/v1/type_traits:1890:1: note: while substituting
deduced template arguments into
      function template '__is_constructible_test' [with _Tp =
      std::__1::allocator<std::__1::__list_node<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *, void *> >, _Args
= <no value>]
__is_constructible_test(_Tp&&, _Args&& ...);
^
/usr/include/c++/v1/type_traits:1949:14: note: in instantiation of
template class
      'std::__1::__is_constructible<false,
      std::__1::allocator<std::__1::__list_node<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *, void *> >,
      std::__1::allocator<std::__1::__list_node<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *, void *> > &&>'
requested here
    : public __is_constructible<is_scalar<_Tp>::value ||
is_reference<_Tp>::value,
             ^
/usr/include/c++/v1/type_traits:1975:14: note: in instantiation of
template class
      'std::__1::__is_constructible_void_check<false,
      std::__1::allocator<std::__1::__list_node<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *, void *> >,
      std::__1::allocator<std::__1::__list_node<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *, void *> > &&>'
requested here
    : public __is_constructible_void_check<__contains_void<_Tp, _Args...>::value
             ^
/usr/include/c++/v1/type_traits:2455:34: note: in instantiation of
template class
      'std::__1::is_constructible<std::__1::allocator<std::__1::__list_node<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *, void *> >,
      std::__1::allocator<std::__1::__list_node<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *, void *> > &&>'
requested here
    : __is_nothrow_constructible<is_constructible<_Tp,
_Args...>::value, _Tp, _Args...>
                                 ^
/usr/include/c++/v1/type_traits:2590:14: note: (skipping 3 contexts in
backtrace; use
      -ftemplate-backtrace-limit=0 to see all)
    : public is_nothrow_constructible<_Tp, typename
add_rvalue_reference<_Tp>::type>
             ^
/usr/include/c++/v1/list:513:52: note: in instantiation of template class
      'std::__1::__compressed_pair<unsigned long,
      std::__1::allocator<std::__1::__list_node<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *, void *> > >'
requested here
    __compressed_pair<size_type, __node_allocator> __size_alloc_;
                                                   ^
/usr/include/c++/v1/list:770:15: note: in instantiation of template class
      'std::__1::__list_imp<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *,
      std::__1::allocator<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *> >' requested here
    : private __list_imp<_Tp, _Alloc>
              ^
/usr/local/include/lemon/bits/alteration_notifier.h:253:15: note: in
instantiation of template
      class
      'std::__1::list<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *,
      std::__1::allocator<lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>::ObserverBase *> >' requested here
    Observers _observers;
              ^
/usr/local/include/lemon/bits/graph_extender.h:84:26: note: in
instantiation of template class
      'lemon::AlterationNotifier<lemon::DigraphExtender<lemon::SmartDigraphBase>,
      lemon::SmartDigraphBase::Node>' requested here
    mutable NodeNotifier node_notifier;
                         ^
/usr/local/include/lemon/smart_graph.h:201:31: note: in instantiation
of template class
      'lemon::DigraphExtender<lemon::SmartDigraphBase>' requested here
  class SmartDigraph : public ExtendedSmartDigraphBase {



More information about the Lemon-user mailing list