
On Fri, Jun 17, 2005 at 10:27:53AM -0400, David Abrahams wrote:
"Thorsten Ottosen" <nesotto@cs.auc.dk> writes:
"David Abrahams" <dave@boost-consulting.com> wrote in message news:ull5bnykl.fsf@boost-consulting.com... | | 1. What does it take to get support for standard containers as ranges? | According to what I can see in the documentation, the standard | containers don't satisfy the range concepts. IOW, | | begin(v) | | isn't valid when v is a standard vector. | | From what I can tell from browsing the implementation, the | requirement should be: | | boost::begin(v)
doesn't it seem strange that a concept requirement is bound to a certain namespace?
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 boost::begin(v); 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; begin(v); as the correct one: - now standard containers fulfil the requirement; - and used-defined versions of begin are taken into account. Oliver