Boost logo

Boost Users :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2005-03-03 19:52:24


Thorsten Ottosen wrote:
> "Jonathan Turkanis" <technews_at_[hidden]> wrote:

>> Would it be possible to indroduce an extra level of indirection so
>> that Range can be used with a type even if there are preexisting
>> begin/end/.. functions that do the wrong thing? For instance,

<snip>

> I was thinking of something like that too. May I ask why you
> want the functions inside a class

David Abrahams and Peter Dimov convinced me this was the only bullet-proof
solution (no problems with ADL or order-dependencies.)

> (partial specialization doesn't
> seem to be needed very frequently, does it)?
>
> I would rather a protocol
> like this was made:
>
> template< class T >
> typename range_iterator<T>::type begin( T& r )
> {
> return adl_begin(r);
> }

This would probably be sufficient, on the assumption that adl_xx is an uncommon
name.

> -Thorsten

Jonathan


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