Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-09-15 19:54:17


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

> "Jeff Flinn" <TriumphSprint2000_at_[hidden]> wrote in message
> news:ci9qjr$ogt$1_at_sea.gmane.org...
> |
> | "David Abrahams" <dave_at_[hidden]> wrote in message
> | news:uk6uvle5e.fsf_at_boost-consulting.com...
> | > "Thorsten Ottosen" <nesotto_at_[hidden]> writes:
> |
> | > I wonder whether it's better to say
> | >
> | > cbegin(x)
> | >
> | > or
> | >
> | > begin(as_const(x))
> | >
> | > The latter is certainly more general.
> |
> | Does this imply that the following would be possible:
> |
> | begin( as_reverse(x) )
>
> rbegin(x) is alreeady there as a parallel to x.rbegin().
>
> | begin( as_const( as_reverse(x) ) )
> | begin( as_reverse( as_const(x) ) )
>
> yes, I think so with some metaprgramming, but its getting quite hard to read
> compared to the single version.

No fancy metaprogramming is required. This is simple stuff.

-- 
Dave Abrahams
Boost Consulting
http://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