Boost logo

Boost :

From: nee Spangenberg (dsp_at_[hidden])
Date: 2003-12-11 04:35:51

Hello AlisdairM,

AlisdairM schrieb:

> Daniel Krügler (nee Spangenberg) <dsp_at_[hidden]> wrote in
> news:3FD7210B.F6DA5B26_at_[hidden]:
> > Hmmh, I really don't like the last point, because it tries to merge
> > to different interfaces here. Should it not use ptrdiff_t as well,
> > because auto_array is more a smartpointer than a container
> > wrapper?
> Auto_array is clearly a container and not an iterator. I won't be
> incrementing the auto_array variable but I might with some iterator (read,
> pointer) that I obtain from it.
> As such it seems the current implementation meets your requirements for
> consistency.
> That said, I scoped_ptr and shared_ptr as closer to containers of a single
> element than iterators as well, although that is a very weak link <g>

I should have been more precise in my former mail, but I did not want to
compare auto_array with shared_ptr, scoped_ptr and the like, but I did
want to compare auto_array with shared_array, scoped_array and so on.

I am not here to decide, whether the XX_array smart pointer family should
support either a container interface or the raw array interface. My reasoning
concerns the inconsistency between auto_array and the remainder of the
XX_array family. All of them should either use ptrdiff_t or size_type, but
mixing seems bad to me.


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