On Mon, 18 Nov 2024 at 19:10, Marc Glisse wrote:
>
> On Sat, 16 Nov 2024, Jonathan Wakely wrote:
>
> >>void
> >>_M_erase(iterator __position) _GLIBCXX_NOEXCEPT
> >>{
> >> + if (__builtin_expect(empty(), 0))
> >> + {
> >> + __glibcxx_requires_nonempty
On Mon, 18 Nov 2024 at 18:32, François Dumont wrote:
>
>
> On 18/11/2024 19:24, François Dumont wrote:
> >
> > On 16/11/2024 02:18, Jonathan Wakely wrote:
> >> On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely
> >> wrote:
> >>> While working on fancy pointer support for the linked lists I noticed
> >
On Sat, 16 Nov 2024, Jonathan Wakely wrote:
void
_M_erase(iterator __position) _GLIBCXX_NOEXCEPT
{
+ if (__builtin_expect(empty(), 0))
+ {
+ __glibcxx_requires_nonempty();
+ return;
+ }
Hmm, I'm having second thoughts about the "re
On 18/11/2024 19:24, François Dumont wrote:
On 16/11/2024 02:18, Jonathan Wakely wrote:
On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely
wrote:
While working on fancy pointer support for the linked lists I noticed
they didn't have any debug assertions. This adds the obvious non-empty
assertion
On 16/11/2024 02:18, Jonathan Wakely wrote:
On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely wrote:
While working on fancy pointer support for the linked lists I noticed
they didn't have any debug assertions. This adds the obvious non-empty
assertions to front(), back(), pop_front() and pop_back
On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely wrote:
>
> While working on fancy pointer support for the linked lists I noticed
> they didn't have any debug assertions. This adds the obvious non-empty
> assertions to front(), back(), pop_front() and pop_back().
>
> For the pop members, adding an as
On Sat, 16 Nov 2024, 01:21 Jonathan Wakely, wrote:
> On Sat, 16 Nov 2024 at 01:09, Jonathan Wakely wrote:
> >
> > While working on fancy pointer support for the linked lists I noticed
> > they didn't have any debug assertions. This adds the obvious non-empty
> > assertions to front(), back(), po
While working on fancy pointer support for the linked lists I noticed
they didn't have any debug assertions. This adds the obvious non-empty
assertions to front(), back(), pop_front() and pop_back().
For the pop members, adding an assertion to the underlying function that
erases a member means it