[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
Fri Dec 4 11:40:50 PST 2020


zoecarver added a comment.

> I think perhaps we are talking past each other and have reached the limits of what this sub-thread can hope to achieve.

I agree. I am sure that we (or at least you two) could talk about the semantics of "teleportation" and "destructively moving" objects for many many hours. But I'm not sure it would be productive to do so (at least in this review thread). So, Arthur, why don't you open a mailing list thread to continue discussing if you'd like.

And we can all agree, no matter what we decide to call it, that in the following snippet, `S0` //and// `S1` will be passed directly:

  struct __attribute__((trivial_abi)) S0 {
    S0();
    S0(const S0 &) = delete;
    S0(S0 &&) = delete;
    int a;
  };
  
  struct S1 {
    S0 s0;
  };

(Which lines up with how this currently works if instead of being deleted, the copy/move constructors of `S0` were simply user-provided.)


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