Boost logo

Boost :

From: JOAQUIN M. LOPEZ MUÑOZ (joaquin_at_[hidden])
Date: 2008-07-19 14:55:59


________________________________________
De: boost-bounces_at_[hidden] [boost-bounces_at_[hidden]] En nombre de Steven Watanabe [watanabesj_at_[hidden]]
Enviado el: sábado, 19 de julio de 2008 19:13
Para: boost_at_[hidden]
Asunto: Re: [boost] [utility] [C++0x] indices/make_indices

> AMDG
>
> In pseudocode using iterators:
>
> deref(advance(begin(tuple)), n)
>
> where advance is implemented as
>
> iterator advance(iterator x, int n) {
> if(n == 0) {
> return(x);
> } else {
> return(advance(x, n - 1));

Shouldn't this last line be

        return(advance(++x, n - 1));

thus ruining the memoization?

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk