Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2005-03-04 08:32:04


"Thorsten Ottosen" <nesotto_at_[hidden]> writes:

> "David Abrahams" <dave_at_[hidden]> wrote in message
> news:uacpk414w.fsf_at_boost-consulting.com...

> | The problem is that controlling which is the best match is sometimes
> | very difficult. Sometimes the best match doesn't get called.
>
> then how can it be the best match then?

Sorry, I mean "best" from a human point-of-view. I mean, "the one you
want."

> | Sometimes there is ambiguity. ADL is a very blunt instrument.
>
> If the implementation was to use a class template, what would be
> preffered naming?

I don't know; the one I posted might be fine.

> Would you want one big fat class with all the functions?
>
> Or would you like a class for each function, say for end(), std::end_impl<T>?

I *think* that for the purpose of adapting a type to meet a concept, a
fat class is probably the best way. Granularity is really most
important at the interface level, so users call

      boost::ranges::begin(s)

rather than something like

      boost::ranges::traits<X>::begin(s)

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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