Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2008-07-19 16:40:09


on Sat Jul 19 2008, Steven Watanabe <watanabesj-AT-gmail.com> wrote:

> AMDG
>
> David Abrahams wrote:
>> Looks to me like you get O(n^2) instantiations of advance. You get N
>> instantiations for the begin iterator, N-1 for the next and so
>> on. What am I missing?
>
> get<0> instantiates advance<x, 0>
> get<1> instantiates advance<x, 1> and reuses advance<x, 0>
> get<2> instantiates advance<x, 2> and reuses advance<x, 1>
> ...

With the ++ in there, it all makes sense. Very clever!

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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