Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-03-04 16:37:42

I'm not sure that we've found the "perfect" solution... but at the same
time, I'd like to get iterator_adaptors out the door, and it would be bad
to change the interface later. So I'm in favor of going with the following
interface style (suggested by someone in an earlier email):

    boost::iterator_adaptor_generator<int*, boost::default_iterator_policies,
>::type Iter;

The trick with getting this approach right, as Dave pointed out, is that
the creation of defaults can only happen for types that are suppose to be
defaulted. I've attached a file that does this. I've done a quick check to
make sure it works for VC++ and g++. The file creates a
iterator_adaptor_generator class... it should be straightforward to apply
the same technique to iterator_adaptor itself.


 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