MatthiasBiel said:
Bug ID:FDBK15340
http://lab.msdn.microsoft.com/Produ...edbackid=0b70534f-d613-4878-b55a-0ca3048d901a
for the first problem.
I didn't create a report for the second problem because I don't have
the 2005 beta installed (and VC7.1 can't be selected in the report
form).
I am afraid the bug doesn't make sense.
This one compiles:
template<class T>
class A {
public:
typedef T X;
};
A<A<int>::X>::X i;
int main()
{
}
C:\c>cl /clr temp.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40904
for Microsoft (R) .NET Framework version 2.00.40607.16
Copyright (C) Microsoft Corporation. All rights reserved.
temp.cpp
Microsoft (R) Incremental Linker Version 8.00.40904
Copyright (C) Microsoft Corporation. All rights reserved.
/out:temp.exe
temp.obj
C:\c>
If we replace A<int> with Type1 and A<Type1> with Type 2, it becomes:
Type2::X::X i;
being equivalent to:
Type2::Type1::X i;
Following that, I checked this and doesn't compile too:
class A
{
public:
typedef int X;
};
class B
{
public:
typedef A X;
};
int main()
{
B::X::X i;
}
C:\c>cl /clr temp.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 14.00.40904
for Microsoft (R) .NET Framework version 2.00.40607.16
Copyright (C) Microsoft Corporation. All rights reserved.
temp.cpp
temp.cpp(17) : error C2146: syntax error : missing ';' before identifier 'i'
temp.cpp(17) : error C3867: 'A::{ctor}': function call missing argument
list; use '&A::{ctor}' to create a pointer to member
temp.cpp(17) : error C2065: 'i' : undeclared identifier
C:\c>