This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: vector lightweight debug mode
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: François Dumont <frs dot dumont at gmail dot com>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, "libstdc++ at gcc dot gnu dot org" <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 18 Nov 2015 12:34:27 +0000
- Subject: Re: vector lightweight debug mode
- Authentication-results: sourceware.org; auth=none
- References: <55FD0F35 dot 4010106 at gmail dot com> <CAH6eHdSzU-HB_0R82HDdFkHy3tMraDw+OGU8AfTY7Gqx8MSMGA at mail dot gmail dot com> <CAH6eHdSR-GM2uYUOyxmi6voLOn1CreSFp=tVRJigf9oSDCZ_dQ at mail dot gmail dot com> <561574BE dot 1060005 at gmail dot com> <20151007200917 dot GU12094 at redhat dot com> <561C0D3A dot 7010504 at gmail dot com> <5648F551 dot 5030404 at gmail dot com> <20151116102923 dot GI2937 at redhat dot com> <564B84C3 dot 3090900 at gmail dot com> <20151118122744 dot GC25025 at redhat dot com>
On 18/11/15 12:27 +0000, Jonathan Wakely wrote:
But my unproven assumption is that it's more common to use operator[]
incorrectly, rather than pass invalid iterators to range insert, which
is a relatively "advanced" operation.
It's worth noting that the google/integration branch doesn't have any
checks on range insert/erase, and they have entire teams who work on
analysing their code base to find common programming errors, and
identify ways to avoid problems.
That doesn't mean we shouldn't include any checks that aren't in the
google branch, and we also shouldn't use all their checks, but it's
useful to look at what they considered important to check.