Boost logo

Boost :

From: Eric Niebler (eric_at_[hidden])
Date: 2005-03-23 20:55:34

Thorsten Ottosen wrote:
> "Eric Niebler" <eric_at_[hidden]> wrote in message
> We're talking about the ADL
> | customization points of /one particular library/.
> are we?

Yes, we are.

  The thing is IMO that were are talking about customization
> points of a concept, not a particular library.

No. boost_range_begin() is *only* called from boost::begin(). Nobody
should be calling it directly. It is part of the Boost.Range library's
interface that it can be customized this way. Concepts have nothing to
do with it.

> | A customization point
> | cannot be in two libraries simultaneously. I must have missed your point
> | again. Please set me straight.
> struct Foo
> { ... this is a range with adaptation ... }
> iterator boost_range_begin( Foo& f );
> iterator std_range_begin( Foo& f );
> iterator adope_range_begin( Foo& f );
> what is the difference between the three functions, apart from their name?

Separate libraries should not be picking the same name for use as a
customization point. The Range library is the only place that defines
the Range concept, and it has one function, boost::begin(), for finding
the beginning of the range. That function has one customization point.
What should it be called? That's the only thing we're concerned with here.

> | But you still haven't given me a reason I can understand why it
> | shouldn't be "boost_range_begin()" etc..
> I'm saying that it might not be the right solution; I don't see
> why we should give the same concept different interfaces.

Concepts are not the concern here -- only how to allow users to
customize the behavior of a library.

> We are already protecting classes by a namespace, shouldn't that be enough.

No, because we're using unqualified calls to turn on ADL.

Eric Niebler
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at