Boost logo

Boost :

Subject: Re: [boost] [Graph] LEDA adapter - concept check VertexListGraph fails
From: Jeremiah Willcock (jewillco_at_[hidden])
Date: 2011-12-18 17:36:16


On Sun, 18 Dec 2011, Jens Müller wrote:

> 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.

That's odd; I can see a need for a using declaration, but not for a
strange function like that one. I think the LEDA adapter will require
some kind of namespace import even with a conforming compiler.

-- Jeremiah Willcock


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