http://llvm.org/bugs/show_bug.cgi?id=16659
Bug ID: 16659
Summary: Abstract class with virtual base
Product: clang
Version: 3.3
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
Currently, clang++ rejects the following code:
struct base {
explicit base(int) {}
virtual void foo() = 0;
virtual ~base() {}
};
struct left : virtual base {};
struct right : virtual base {};
struct derived : left, right {
virtual void foo() override {}
derived() : base(10) {}
};
int main() {}
The code is correct according to:
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#257
(Summarized: The code is rejected because left and right don't have a
constructor that initializes their virtual base. However, left and right will
never have to initialize their virtual base, since they are abstract and thus
will never be the 'most derived class'.)
--
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