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

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Dec 8 23:22:04 PST 2013


            Bug ID: 18185
           Summary: Deleted copy/assign considered "trivial" by
           Product: clang
           Version: 3.3
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: unassignedclangbugs at nondot.org
          Reporter: temporal at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Both static_asserts below fail on Clang but pass on GCC.

In my case, I incorrectly tried to copy a class with deleted copy and
assignment, but the code which actually performed the copy was a template that
used the type traits to decide when it could use memcpy instead as an
optimization.  So, instead of the expected compiler error I got silent memory

struct S {
  S(const S&) = delete;
  S& operator=(const S&) = delete;

    "Deleted copy constructor considered trivial.");
    "Deleted operator= considered trivial.");

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/40c5df73/attachment.html>

More information about the llvm-bugs mailing list