[libcxx-commits] [PATCH] D113502: [WIP][libc++] forward_list allow rvalues in C++03.

Arthur O'Dwyer via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 9 11:43:57 PST 2021


Quuxplusone added a comment.

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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113502/new/

https://reviews.llvm.org/D113502



More information about the libcxx-commits mailing list