[libcxx-commits] [PATCH] D69344: [libcxx] Add move constructor to compressed pair

Eric Fiselier via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 24 08:37:40 PDT 2019


EricWF added a comment.

In D69344#1719855 <https://reviews.llvm.org/D69344#1719855>, @zoecarver wrote:

> I would have also expected `= default` to work but, it doesn't seem to. I think because `__compressed_pair ` inherits from both its elements instead of storing them as members.


You need to default it in both bases and in the compressed pair itself.

> Yes, we care to fix that for D62274 <https://reviews.llvm.org/D62274>.

I don't think we care about move-only types in C++03.

Also, did you test this change? Because adding a move constructor to compressed pair suppresses the copy constructor and make the type always move only.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69344





More information about the libcxx-commits mailing list