This is an archive of the discontinued LLVM Phabricator instance.

std::forward_list::swap to use propagate_on_container_swap for noexcept specification
ClosedPublic

Authored by airglow923 on May 5 2021, 5:17 AM.

Details

Summary

This revision is a patch for bug 50224.

The current implementation of std::forward_list::swap uses propagate_on_container_move_assignment for noexcept specification. This revision has been made in an attempt to change it to propagate_on_container_swap.

Diff Detail

Repository
rCXX libc++

Event Timeline

airglow923 requested review of this revision.May 5 2021, 5:17 AM
airglow923 created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2021, 5:17 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
airglow923 updated this revision to Diff 343011.May 5 2021, 5:20 AM

This does actually look like a pretty straightforward typo in forward_list; the other containers all seem to get it right.
It's too bad that none of our tests notice the change; but, the POCCA/POCMA/POCS traits are obscure, and this affects literally nothing but -std=c++11 mode. I don't think it makes sense to hold up this patch for lack of tests.
(@airglow923 please wait for an approval from "libc++" before landing. @ldionne ping! am I missing anything subtle here?)

ldionne accepted this revision.EditedJun 22 2021, 9:36 AM

Thanks a lot for fixing this and sorry it went under the radar.

This revision is now accepted and ready to land.Jun 22 2021, 9:36 AM