[libcxx-commits] [PATCH] D66262: Constrain tuple/unique_ptr move constructors (2899)

Zoe Carver via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 23 12:07:23 PST 2020


zoecarver added a comment.

While attempting to fix the remaining CI build failures I arrived at a problem and I'm not sure what is the best way to proceed. This is the problem:

1. The "trivial_abi" attribute requires a move constructor or a copy constructor. <https://clang.llvm.org/docs/AttributeReference.html#trivial-abi>
2. The standard requires that `unique_ptr`'s "move constructor" doesn't participate in overload resolution unless a requirement is met. This requires a templated "move constructor" so that the function may be disabled.
3. A move constructor is not permitted to be templated. From the standard's point of view, I think it's OK for `unique_ptr` not to have a move constructor so long as it is move constructible (which would be the case if it has a templated "move constructor").

I am not super familiar with the `trivial_abi` attribute, so maybe there's some way around this. Any suggestions would be appreciated :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66262



More information about the libcxx-commits mailing list