Boost logo

Boost :

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


Peter Dimov schrieb:
[snip]

> The standard containers can only get away with size_t because they know
> their size and can assert(index < size()); when a negative argument is
> passed, it is silently converted to something that is usually larger than
> size().

I did not claim otherwise. So, since auto_array has no knowledge of its
actual size, it should use operator[](ptrdiff_t) as the remainder of the XX_array
class templates (scoped_array, shared_array,...), if we follow your argumentation.

That current inconsistency among the XX_array smartpointer classes was what
I was reasoning about.

Daniel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk