Boost logo

Boost :

Subject: Re: [boost] [Graph] LEDA adapter - concept check VertexListGraph fails
From: Jens Müller (blog_at_[hidden])
Date: 2011-12-18 17:33:57


On 18.12.2011 22:59, Jeremiah Willcock wrote:
> That function is in the boost namespace, so it won't be found when
> searching for an unqualified call to vertices() (which is what
> algorithms are supposed to use). You might need to do something like
> the ADL hack you mentioned (pulling those functions into the global
> namespace) to get the concept check to pass.

As far as I can tell, this _is_ used.

boost/graph/graph_concepts.hpp contains the following:

#if !defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) \
  && !BOOST_WORKAROUND(__GNUC__, <= 2) \
  && !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
# define BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK
#endif

#ifdef BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK
template <class T>
typename T::ThereReallyIsNoMemberByThisNameInT vertices(T const&);
#endif

This line is mentioned in the error message, so
BOOST_VECTOR_AS_GRAPH_GRAPH_ADL_HACK _is_ indeed defined.

- Jens


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk