[LLVMbugs] [Bug 18185] Deleted copy/assign considered "trivial" by __has_trivial_{copy, assign}

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Dec 8 23:39:35 PST 2013


Richard Smith <richard-llvm at metafoo.co.uk> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |richard-llvm at metafoo.co.uk
         Resolution|---                         |INVALID

--- Comment #1 from Richard Smith <richard-llvm at metafoo.co.uk> ---
12.8 [class.copy]p12:

"A copy/move constructor for class X is trivial if it is not user-provided, its
parameter-type-list is equivalent to the parameter-type-list of an implicit
declaration, and if
  — class X has no virtual functions (10.3) and no virtual base classes (10.1),
  — class X has no non-static data members of volatile-qualified type, and
  — the constructor selected to copy/move each direct base class subobject is
trivial, and
  — for each non-static data member of X that is of class type (or array
thereof), the constructor selected to copy/move that member is trivial;
otherwise the copy/move constructor is non-trivial."

So S's copy constructor is trivial. And likewise its copy assignment operator
is trivial. If GCC says otherwise, then there's either a bug in GCC or a bug in
the standard.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131209/020b8420/attachment.html>

More information about the llvm-bugs mailing list