D
Dan Trowbridge
He everyone,
I am just getting started with .NET and I am having a porting problem.
I get and error in code that lookssomething like this (really stripped down
but you get the idea)...
class dt
{
std::deque< class dt > dtdq;
};
That is a class that contains a deque of class objects of it's own type.
Code like this use to compile just fine under VC6.
Under VS.NET the compiler tells me that 'dt' is not defined when it trys to
compile this. I get the following...
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque(59) :
error C2027: use of undefined type
'dt'c:\dan\cwork\transolv\transolvDoc.cpp(28) : see declaration of 'dt'
c:\dan\cwork\transolv\transolvDoc.cpp(29) : see reference to class template
instantiation 'std::deque<_Ty>' being compiled
with
[
_Ty=dt
]
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque(60) :
error C2027: use of undefined type 'dt'
c:\dan\cwork\transolv\transolvDoc.cpp(28) : see declaration of 'dt'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque(61) :
error C2027: use of undefined type 'dt'
c:\dan\cwork\transolv\transolvDoc.cpp(28) : see declaration of 'dt'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque(62) :
error C2027: use of undefined type 'dt'
c:\dan\cwork\transolv\transolvDoc.cpp(28) : see declaration of 'dt'
It looks like the "updated" STL needs to know the size of the 'dt' class
when it trys to compile the code but since it is inside the class it hasn't
figured it's size out yet.
It looks like it is also assigning the type 'dt' to a varaible inside the
deque template class.
Is there work-around someone knows about? I use this design feature in a
lot of code I developed in VC6 and it represents a major re-write if I can't
figure away around this.
Thanks in advance
Dan Trowbridge
I am just getting started with .NET and I am having a porting problem.
I get and error in code that lookssomething like this (really stripped down
but you get the idea)...
class dt
{
std::deque< class dt > dtdq;
};
That is a class that contains a deque of class objects of it's own type.
Code like this use to compile just fine under VC6.
Under VS.NET the compiler tells me that 'dt' is not defined when it trys to
compile this. I get the following...
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque(59) :
error C2027: use of undefined type
'dt'c:\dan\cwork\transolv\transolvDoc.cpp(28) : see declaration of 'dt'
c:\dan\cwork\transolv\transolvDoc.cpp(29) : see reference to class template
instantiation 'std::deque<_Ty>' being compiled
with
[
_Ty=dt
]
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque(60) :
error C2027: use of undefined type 'dt'
c:\dan\cwork\transolv\transolvDoc.cpp(28) : see declaration of 'dt'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque(61) :
error C2027: use of undefined type 'dt'
c:\dan\cwork\transolv\transolvDoc.cpp(28) : see declaration of 'dt'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\deque(62) :
error C2027: use of undefined type 'dt'
c:\dan\cwork\transolv\transolvDoc.cpp(28) : see declaration of 'dt'
It looks like the "updated" STL needs to know the size of the 'dt' class
when it trys to compile the code but since it is inside the class it hasn't
figured it's size out yet.
It looks like it is also assigning the type 'dt' to a varaible inside the
deque template class.
Is there work-around someone knows about? I use this design feature in a
lot of code I developed in VC6 and it represents a major re-write if I can't
figure away around this.
Thanks in advance
Dan Trowbridge