Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-02-27 16:13:55

I've been playing around with this idea some more. One idea I've had is
instead of using the named parameters for just the traits, use it for
*all* the parameters of iterator_adaptor, wrapping everything in an
iterator_adaptor_generator. Here's how using it would look:

  int* x;
    ::reference<const int&>
    ::end<>::type iter(x);
The end<> deserves some explaining. It's there so that we only instantiate
*one* version of the iterator_adaptor, thus saving the compiler LOTS of
work. One possibility is to add a macro, such as

#define gentype end<>::type

to get rid of the end<> from the user's view. Or if someone can think of
another way to do this, great!

I've attached the implementation for the above... pardon some nasty macro
stuff... not my expertise.


 Jeremy Siek www:
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906

Boost list run by bdawes at, gregod at, cpdaniel at, john at