forward list patch

Paolo Carlini
Wed Oct 27 01:16:00 GMT 2010

On 10/26/2010 10:44 PM, François Dumont wrote:
> I will try to think about what could be done if the Standard say that
> we can invalidate before begin on swap but franckly I don't see the
> point of considering the before begin as invalid if the underlying
> normal iterator is not.
If the standard says it can be invalidated it depends on the
implementation details whether it is or it is not and portable code
certainly cannot rely on it to be valid. I agree that harmonizing the
implementation defined behavior of normal-mode and debug-mode is in
general a good idea, but if that means adding a lot of slow, and ad-hoc,
and cryptic code, I become very very nervous.
> Do you also thing that normal implementation should be changed too so
> that normal before begin cannot be used anymore ? Or that after the
> swap it1_b points to fl2 ?
I think we should not rush any change in this area. I'll raise an issue
on the LWG reflector or directly to other LWG people at the next meeting
I will attend. I only add that our implementation is very-very close in
terms of before_begin to the old HP / SGI slist, we are not talking
about new invention.


More information about the Libstdc++ mailing list