|
Boost : |
From: Pavol Droba (droba_at_[hidden])
Date: 2004-09-15 15:00:28
On Wed, Sep 15, 2004 at 01:35:11PM -0500, Doug Gregor wrote:
>
> On Sep 15, 2004, at 1:09 PM, Thorsten Ottosen wrote:
>
> >"Doug Gregor" <dgregor_at_[hidden]> wrote in message
> >news:DD33A4E0-0733-11D9-8C97-000A95B0EC64_at_cs.indiana.edu...
> >|
> >| On Sep 15, 2004, at 10:09 AM, Thorsten Ottosen wrote:
> >
> >| > Given the framework in boost.range these would be absolutely
> >*trivial*
> >| > to add.
> >| >
> >| > 1st vote: for or against adding these?
> >|
> >| Against. If the C++ committee likes them, we can add them into a
> >later
> >| revision of Boost.
> >
> >Ok, but doesn't it usually work the way that things go into boost
> >first? If
> >not for anything else, then to
> >see if the stuff works in practice?
>
> cbegin()/cend() aren't all that useful unless they also work with the
> standard library containers. If it's never going to happen for the
> standard containers, why bother putting it into Boost? Something like
> "as_const(c)" is a totally different story, of course.
>
Are you sure about this? What about:
template<typename ContainerT>
typename ContainerT::const_iterator const_begin(const ContainerT& C)
{
return C.begin();
}
This should do exactly what we want.
To sumarize, I like the idea of const_begin()/end() in this wording.
Regards,
Pavol
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk