[libcxx-commits] [PATCH] D143914: [libc++] Clean up pair's constructors and assignment operators

Jordan Rupprecht via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Feb 14 16:28:18 PST 2023


rupprecht added a comment.

In D143914#4127330 <https://reviews.llvm.org/D143914#4127330>, @ldionne wrote:

> In D143914#4125054 <https://reviews.llvm.org/D143914#4125054>, @rupprecht wrote:
>
>> The only other breakage I found so far that might be worthy of mention is that constructing containers requires begin/end iterators of pairs, not tuples, but frameworks for doing functional-style programming often tuples to be fully generic, so this breaks. This seems like an intended effect of this patch, but makes things a little less ergonomic. Is there an idiomatic way to do that w/o having to write your own tuple->pair boilerplate?
>
> Switching to `-std=c++2b` would fix that -- IMO that sounds reasonable but I am interested to know if you disagree.

It isn't an option for us, but I don't think it's worth it to keep a non-conformant extension + complexity in libc++ just so we can avoid a little boilerplate to do tuple->pair manually in a couple places.

> Thanks a lot for the back and forth here, this is invaluable. I will take a look at the `vector` issue when I have a bit of time.
>
> I would recommend you get started on fixing the obvious ones at least, but this is probably going to be paused for ~2 weeks since I'll go OOO next week.

Sounds good, that timeline should work. Have a good break!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143914



More information about the libcxx-commits mailing list