[LLVMbugs] [Bug 15886] New: defaulted default constructor of class cannot be used by non-static data member initializer which appears before end of class definition

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed May 1 07:01:18 PDT 2013


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

            Bug ID: 15886
           Summary: defaulted default constructor of class cannot be used
                    by non-static data member initializer which  appears
                    before end of class definition
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: st at quanttec.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following code fails to compile with the current trunk version of clang.
This seems to be a regression that may be related to the issue referred to in
#15458

struct Test {
    class Nested {
        Nested() {}
    };

    Test() noexcept = default;

    int data_{};
};

clang++ --std=c++11 test.cpp
test.cpp:6:5: error: defaulted default constructor of 'Test' cannot be used by
non-static data member initializer which
      appears before end of class definition
    Test() noexcept = default;
    ^
1 error generated.

-- 
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/20130501/797e8085/attachment.html>


More information about the llvm-bugs mailing list