Boost logo

Boost Users :

Subject: Re: [Boost-users] [graph] Problem compiling simple graph code with recent g++
From: Stephen Kell (srk31_at_[hidden])
Date: 2010-03-18 14:36:41


> Could you please try moving your functions outside the boost namespace?
> Whether those are found depends on exactly where the caller is (I don't
> think calls from boost::concept will find things in boost:: by default),
> while having them in the same namespace as Gr would ensure that they are
> found by ADL.

Thanks very much for this response. Indeed, it compiles if I move my
overloads into the same namespace as Gr. I'm not sure why I didn't think
of trying that! Many thanks for the fix.

I still find it a bit surprising... I guess I need to re-read the ADL
rules. :-) I'm pretty sure I've seen some examples in the online
documentation which don't follow this pattern (e.g. the LEDA graph
adaptation tutorial) but no doubt there is some other intricacy of
name lookup that makes them work....

Thanks again!
Stephen


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