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

            Bug ID: 19010
           Summary: Empty base of class with trivial default constructor
                    is not initialized in constant expression
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++11
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

The trunk version of clang fails to compile the following test:

struct Empty {};

struct Empty2 : Empty {};

struct Test : Empty2 {
  constexpr Test() {}
};

void test() {
  constexpr Test t;    
}

> clang++ --std=c++1y test.cpp
test.cpp:10:18: error: constexpr variable 't' must be initialized by a constant
expression
  constexpr Test t;
                 ^
test.cpp:10:18: note: subobject of type 'Empty' is not initialized
1 error generated.

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