[LLVMbugs] [Bug 16174] New: typedef causes instantiation of a class which fails due to an incomplete type
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed May 29 06:20:09 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16174
Bug ID: 16174
Summary: typedef causes instantiation of a class which fails
due to an incomplete type
Product: clang
Version: 3.2
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: tommitissari at hotmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
template <typename T>
struct A
{
struct B
{
struct C
{
T data; // #[0]
};
C data; // #[1]
};
typedef typename B::C X; // #[2]
};
struct I // #[4]
: A<I> // #[3]
{
};
int main()
{
return 0;
}
----
[0]: Error: Field has incomplete type 'I'
[1]: In instantiation of member class 'A<I>::B::C' requested here
[2]: In instantiation of member class 'A<I>::B' requested here
[3]: In instantiation of template class 'A<I>' requested here
[4]: Definition of 'I' is not complete until the closing "}"
If you comment out the line #[1], the code compiles.
--
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/20130529/d38ad671/attachment.html>
More information about the llvm-bugs
mailing list