Boost logo

Boost :

From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2019-12-04 22:12:39


On Wed, Dec 4, 2019 at 6:14 AM Andrzej Krzemienski via Boost <
boost_at_[hidden]> wrote:

> These goal 3 is in clear conflict with either 1 or 2. This becomes clear
> when we consider what should be the response to doing a resize() over
> capacity(): a precondition violation or a normal course of action signaled
> by an exception.
>

The severity of buffer overrun bugs should be considered in this case, as
well as the overhead of checking and calling boost::throw_exception. Under
-fno-exceptions, this is literally a single cmp instruction. I can't
imagine a C++ program where this would matter, but if one exists, I can't
imagine it would be using a universal fixed_string type. The correct design
is to check and call boost::throw_exception, rather than assert.


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