Boost logo

Boost :

From: Thorsten Ottosen (nesotto_at_[hidden])
Date: 2002-10-23 12:37:23


I think the these two operators in array

        reference operator[](size_type i) { return elems[i]; }
        const_reference operator[](size_type i) const { return elems[i]; }

should have a range check in debug mode, that is, they should be changed to

        reference operator[](size_type i) { assert( i < size() ); return
elems[i]; }
        const_reference operator[](size_type i) const { assert( i <
size() ); return elems[i]; }

so that small irritating bugs are caught

Am I right?

Thorsten Ottosen, Aalborg University
nesotto_at_[hidden]


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