|
Boost Users : |
Subject: Re: [Boost-users] [BGL] Implementing own graph types: Overloading in namespace boost or ADL?
From: Philipp Moeller (philipp.moeller_at_[hidden])
Date: 2012-03-23 16:04:55
Jeremiah Willcock <jewillco_at_[hidden]> writes:
> On Fri, 23 Mar 2012, Philipp Moeller wrote:
>
>> The documentation does not explicitly mention which of both approaches
>> is recommended to implement the free function of the graph concepts for
>> a custom graph. Usually the graph will be in its own namespace.
>>
>> Should the free functions be declared in the boost namespace or in the
>> same namespace as the graph?
>
> In the same namespace as the graph.
Maybe that should be stated explicitly somewhere.
>
>> This also would determine if BGL functions should be called qualified or
>> unqualified outside of namespace boost.
>
> They should be called unqualified; I try to make sure that examples do
> that so that they will work on user-defined graph types.
The LEDA example [1] does exactly the opposite. Probably that would be a
good start.
>
> -- Jeremiah Willcock
>
-- Philipp Moeller GeometryFactory [1] : http://www.boost.org/doc/libs/1_49_0/libs/graph/doc/leda_conversion.html
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