http://llvm.org/bugs/show_bug.cgi?id=20414
Bug ID: 20414
Summary: clang thinks class is incomplete in exception
specification
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
struct B;
struct A {
B& operator->();
int foo;
};
struct B {
auto operator->() -> A*;
auto f() throw(decltype(A()->foo)) -> void;
};
My understanding is that per 9.2 [class.mem], B should be considered complete
inside of the exception specification, and this code should be valid. gcc (4.8)
and edg-based compilers allow this example without complaint; clang complains:
error: incomplete definition of type 'B'
auto f() throw(decltype(A()->foo)) -> void;
^~~
note: definition of 'B' is not complete until the closing '}'
struct B {
^
clang version 3.5.0 (trunk 213749)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
--
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