[PATCH] D92361: [trivial-abi] Support types without a copy or move constructor.
Zoe Carver via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 3 18:01:34 PST 2020
zoecarver added a comment.
@rjmccall Thanks for all that information. You're right; thinking about it in the context of four value operations is helpful.
> Hmm. My first instinct is to say that a type that "adds new information" about its special members — i.e. that explicitly declares its destructor or copy/move constructors for some reason other than to immediately explicitly default them — should always be treated conservatively in the absence of a trivial_abi attribute. So a type that explicitly deletes all its copy/move constructors should never be treated as destructively movable without the attribute. A type with implicitly-deleted copy/move constructors due solely to subobjects that are still destructively movable should still be destructively movable, I think.
Just to be clear, this is the opposite of what we were talking about earlier. Earlier I was suggesting that a type without the trival_abi attribute (such as `S1`), and without any move/copy constructors because of a subobject (`S0`) that had the attribute, should //not// be destructively movable. But, I see merit in both sides of the argument, so I'm happy to do it either way.
So, if we're all in agreement, I'll update this patch so that `S1` is passed directly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92361/new/
https://reviews.llvm.org/D92361
More information about the cfe-commits
mailing list