On Wed, Dec 4, 2019 at 6:14 AM Andrzej Krzemienski via Boost < boost@lists.boost.org> 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.