Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2005-04-29 14:57:27

If I'm understanding the Boost.PointerContainer docs,
ptr_begin(), ptr_end() etc. are provided so that
certain mutating std algorithms can be used on
pointer containers.

docs need to be updated; ptr_begin() etc are history.

But wouldn't it be more convenient to provide
a memfun like

  ptr_iterator make_ptr_iterator(iterator);

for obtaining a ptr_iterator from a
regular iterator? This way, one could easily use
std algorithms not only with [ptr_begin(),ptr_end()),
but also with any other range (for instance,
those obtained from equal_range()). With this memfun,
the ptr_begin() familiy would be kind of redundant.

Just an idea...

the usability of ptr_begin() etc was severely reduced by the shift to a void*

you can still get the original iterators are begin().base() etc, but just
remember the reference type is void*&.

and there is no way to provide a portable cast to T*&; it might work on 99% of
all compilers, but it aint portable.


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