Subject: [forward_list] push_front is allowed to invalidate iterators and/or references?
From: Tadeus Prastowo (tadeus.prastowo_at_[hidden])
Date: 2019-06-26 15:39:02
To quote http://eel.is/c++draft/sequences#forwardlist.modifiers-1:
None of the overloads of insert_Âafter shall affect the validity of
iterators and references, [...].
And, to quote http://eel.is/c++draft/sequences#forwardlist.modifiers-3
on push_front: Effects: Inserts a copy of x at the beginning of the
So, there is no requirement that performing push_front on an
std::forward_list object shall not invalidate any iterators and/or
Isn't this a defect in the standard, considering that
claims that no iterators and references will be invalidated by
-- Best regards, Tadeus
STD-DISCUSSION list run by herb.sutter at gmail.com
Older Archives on Google Groups