From: David Abrahams (dave_at_[hidden])
Date: 2005-06-17 12:45:09
Oliver Kullmann <O.Kullmann_at_[hidden]> writes:
> On Fri, Jun 17, 2005 at 10:27:53AM -0400, David Abrahams wrote:
>> "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
>> Not really; especially if you show the "as-if" implementation of
>> boost::begin. But more importantly, as far as I can tell from the
>> code, that *is* the actual requirement! Otherwise, standard
>> containers don't satisfy the concept. It doesn't matter how strange
>> it seems if the alternative is inaccurate.
> I don't think that the requirement should be
> since functions cannot be partially specialised, and only the
> overload mechanism together with ADL is available to use a
> user-defined begin-function. In cases like this I regard
> the requirement
> using boost::begin;
> as the correct one:
> - now standard containers fulfil the requirement;
> - and used-defined versions of begin are taken into
boost::begin is defined to look up a user-defined function via ADL.
This was extensively discussed on the mailing list. I'm not saying
one is a better approach than another, just that you're coming in late
on an issue that's been considered.
My post is not about what the requirement ought to be; it's about how
to document the requirement that is already there in the code.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk