[LLVMbugs] [Bug 20836] New: Missing const in is_copy_constructible/assignable

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 2 10:36:14 PDT 2014


            Bug ID: 20836
           Summary: Missing const in is_copy_constructible/assignable
           Product: libc++
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kaballo86 at hotmail.com
                CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
    Classification: Unclassified

Created attachment 12977
  --> http://llvm.org/bugs/attachment.cgi?id=12977&action=edit
proposed fix

The implementations of copy-constructible/assignable related traits apply const
to a reference type, which is ignored. This results in the following assertions
firing when they should hold:

    #include <type_traits>

    struct T {
      T(T&) = default;
      T& operator=(T&) = default;

    int main() {
      static_assert(!std::is_copy_assignable<T>::value, "is_copy_assignable");


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/20140902/07c4ddd5/attachment.html>

More information about the llvm-bugs mailing list