Boost logo

Boost Users :

Subject: Re: [Boost-users] [BGL] read_graphml fails at compilation but MutableGraph concept test succeeds
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-02 10:20:10


AMDG

Paul Hilbert wrote:
> Look at this (shortened) code fragment:
>
> namespace boost {
> ...
> Node* add_vertex(HalfedgeGraph& g) {
> Node* n = new Node();
> g.AddNode(n);
> return n;
> }
> ...
> }
>
> <snip>
>
>
> The concept test at #1 (calling Node* add_vertex(HalfedgeGraph&)) succeeds
> (if I remove or alter the add_vertex function it fails as expected), but the
> read_graphml function at #2 doesn't compile telling me that
> add_vertex(HalfedgeGraph&) isn't compiled. How come the partial graph_traits
> specialization works for the concept-test-class but not for the graphml
> reader?
>
> (The HalfedgeGraph class did prove correct in the past and the
> graph_traits<HalfedgeGraph>::vertex_descriptor is a typedef for Node*)
>

add_vertex needs to be in an associated namespace of HalfedgeGraph or
ADL can't find it.

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net