This is an archive of the discontinued LLVM Phabricator instance.

[WIP][libc++] forward_list allow rvalues in C++03.
AbandonedPublic

Authored by Mordante on Nov 9 2021, 11:24 AM.

Details

Reviewers
None
Group Reviewers
Restricted Project
Summary

Based on remarks by Quuxplusone during the review of D113364.

Tested locally this works, but I want a CI run before looking at the
other rvalues disabled in C++03.

Diff Detail

Event Timeline

Mordante requested review of this revision.Nov 9 2021, 11:24 AM
Mordante created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2021, 11:24 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante planned changes to this revision.Nov 9 2021, 11:24 AM

FWIW, I would expect this to pass CI, and I think it's a good idea (but only if the matching change is made to std::list).

I did some stuff earlier this year (or last year?) to extend our C++11 support back into C++03-plus-Clang-extensions, but then kinda lost momentum after the first or second PR because it turned out that there were a lot of awkward non-technical decision points. Like, I thought it would make sense to enable c.emplace{,_front,_back} in C++03 mode, but not to enable c's own move-constructors and move-assignment-operators; which left c.insert(value_type&&) in a gray area in the middle (and leaning toward not). Which means the patches weren't the nice "rip out a bunch of ifdefs" you'd probably expect; instead they turned into "fiddle with the placement of the ifdefs," which was much less satisfying.

Anyway, I can't think of any reason anyone would object to enabling list::merge-for-rvalues in C++03 mode.

Mordante abandoned this revision.May 7 2023, 10:06 AM

Let's not backport more features to C++03.

Herald added a project: Restricted Project. · View Herald TranscriptMay 7 2023, 10:06 AM