https://llvm.org/bugs/show_bug.cgi?id=23072

            Bug ID: 23072
           Summary: Unjustified warning for D.3
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++14
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

The problem is that an unjustified warning is arisen when explicitly defaulted
copy-constructor is defined when the class has a user-declared copy
assignment operator or a user-declared destructor. $D.3 states it's about
implicit and not explicit definition. Quote:

The implicit definition of a copy constructor as defaulted is deprecated if the
class has a user-declared copy
assignment operator or a user-declared destructor. 

Code like this:

struct W {

  W(const W&) = default;  

  int a;

  ~W() { a = 9; }
};

will emit unjustified warning for now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to