http://llvm.org/bugs/show_bug.cgi?id=18882

            Bug ID: 18882
           Summary: Default initialization of an object of const type
                    requires user-defined default constructor, even if I
                    provide one.
           Product: clang
           Version: 3.4
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

The code is as follows:

class A {
  public:
    A() = default;
  private:
    int i = 1;
};

int main() {
  const A a;
  return 0;
}

The clang++ gives an error: "error: default initialization of an object of
const type 'const A' requires a user-provided default constructor"

-- 
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