Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2002-06-17 18:23:25

Hi Dirk,

On Tue, 18 Jun 2002, Dirk Gerrits wrote:
dirkg> On the default
dirkg> of Value is said to be: std::iterator_traits<
dirkg> std::iterator_traits<BaseIterator>::value_type >::value_type
dirkg> which seems a bit 'overdone'. I think it should be
dirkg> std::iterator_traits<BaseIterator>::value_type, correct?

I think the original is correct. The idea of an indirect_iterator is that
you have a base iterator whose value types are also iterators, and that
the indirect_iterator does a double dereference inside operator*. Thus the
value type of indirect_iterator is the value type of the value type of the
base iterator.

dirkg> Also the docs say that you can't use the default template parameters for
dirkg> iterator_adaptor when there is no partial template specialization
dirkg> support and the base iterator is a raw pointer. I was wondering what the
dirkg> rationale is for not providing a workaround for this. Is it simply not
dirkg> possible, or are there other reasons?

The reason was that we believed it not possible, which I still think is
the case. Though you never know what new tricks people will come up with :)


 Jeremy Siek
 Ph.D. Student, Indiana Univ. B'ton email: jsiek_at_[hidden]
 C++ Booster ( office phone: (812) 855-3608

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