[PATCH] D50119: Compiler support for P1144R0 "__is_trivially_relocatable(T)"

Nicolas Lesser via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 16 17:38:10 PDT 2018


Rakete1111 added a comment.

It would be nice to be able to diagnose `X`:

  template <typename T>
  struct Foo {
    struct [[trivially_relocatable]] X { // no warning
      X(X &&) = delete;
    };
  };
  
  Foo<int> f; // no warning
  static_assert(!__is_trivially_relocatable(Foo<void>::X)); // ok

But otherwise, you might want to put the attribute in the `clang` namespace. LGTM then, but you'll want to wait for someone more senior than me to review (and possibly accept) it.


Repository:
  rC Clang

https://reviews.llvm.org/D50119





More information about the cfe-commits mailing list