Boost logo

Boost :

Subject: Re: [boost] [container] stable_vector::back() is broken in Boost 1.53
From: Petr Machata (pmachata_at_[hidden])
Date: 2013-04-08 12:03:27


Stefan Strasser <strasser_at_[hidden]> writes:

> it's because of out-of-bounds vector access. is it intentional that
> container::vector::operator[] doesn't assert n < size()? would have
> caught this bug.

That's how std::vector behaves. If you want checking, you are supposed
to use the "at" method.

Thanks,
PM


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