S
Steve Richter
I am having a very hard time getting my 6.0 C++ template code to
compile on C++ .NET.
The following is one example of code that compiles in 6.0 but not in
..NET. Any ideas why?
-----------------------------------------
#include <list>
template <class A> class Cursor : public std::list<A>::iterator
{
void PosAfterActual( std::list<A>::iterator it ) ;
} ;
------------------------------------------------
Error message is:
c:\SrcomNet\TestTclass2.h(8) : warning C4346:
'std::list<_Ty>::iterator' : dependent name is not a type
prefix with 'typename' to indicate a type
c:\SrcomNet\TestTclass2.h(9) : see reference to class template
instantiation 'Cursor<A>' being compiled
c:\SrcomNet\TestTclass2.h(8) : error C2061: syntax error : identifier
'iterator'
Any help is very appreciated.
-Steve Richter
compile on C++ .NET.
The following is one example of code that compiles in 6.0 but not in
..NET. Any ideas why?
-----------------------------------------
#include <list>
template <class A> class Cursor : public std::list<A>::iterator
{
void PosAfterActual( std::list<A>::iterator it ) ;
} ;
------------------------------------------------
Error message is:
c:\SrcomNet\TestTclass2.h(8) : warning C4346:
'std::list<_Ty>::iterator' : dependent name is not a type
prefix with 'typename' to indicate a type
c:\SrcomNet\TestTclass2.h(9) : see reference to class template
instantiation 'Cursor<A>' being compiled
c:\SrcomNet\TestTclass2.h(8) : error C2061: syntax error : identifier
'iterator'
Any help is very appreciated.
-Steve Richter