[google][4.8] Add more inexpensive debug checks to vector, bitvector, deque

Jonathan Wakely jwakely.gcc@gmail.com
Mon Jan 6 20:58:00 GMT 2014


On 6 January 2014 20:43, François Dumont wrote:
>
>     For my information, all those checks are already done in gcc
> _GLIBCXX_DEBUG mode, why duplicating those in normal mode with a dedicated
> macro ? Is it that you only want to keep debug checks that have a constant
> time cost ?

The reasons have been explained by Paul on this list in the past.
Debug Mode is binary incompatible with normal mode, so cannot be used
when it is not possible to recompile every file and library in a
program. Debug Mode breaks the complexity guarantees of the standard
containers and algorithms.

The inexpensive checks on the Google branch do not alter the ABI or
performance guarantees.  I am interested in adding more of those
checks to the (non-Debug Mode) library.



More information about the Libstdc++ mailing list