#1 Visual C++ 6.0 compilation

open
nobody
None
5
2003-04-19
2003-04-19
Anonymous
No

Dear Nicola Santi,

Thank you for the excellent Eternity framework.
It work greate with Borland compiler, but I have found a problem with Microsoft Visual C++ 6.0 compiler. I was not be able to compile examples.

persist_xml.hpp line 67
'void' function returning a value:

void close()
{
return done();
}

There are some problems with templates.

Best wishes,
Alexei Nikitin.
amnikitin@eimb.ru

########################
output
########################
Build examples
cl -c /GR /EHsc /LD /I..\..\..\include ..\..\..\src\eternity.cpp
eternity.cpp
..\..\..\include\eternity/persist_xml.hpp(67) : error C2562: 'close' : 'void' function returning a value
..\..\..\include\eternity/persist_xml.hpp(65) : see declaration of 'close'
..\..\..\include\eternity/algorithms.hpp(189) : error C2059: syntax error : ''template<''
..\..\..\include\eternity/algorithms.hpp(190) : error C2065: 'CollectionContent' : undeclared identifier
..\..\..\include\eternity/algorithms.hpp(205) : error C2143: syntax error : missing ';' before '{'
..\..\..\include\eternity/algorithms.hpp(205) : error C2447: missing function header (old-style formal list?)
..\..\..\include\eternity/algorithms.hpp(217) : error C2954: template definitions cannot nest
..\..\..\include\eternity/algorithms.hpp(217) : error C2059: syntax error : ''template<''
..\..\..\include\eternity/algorithms.hpp(233) : error C2143: syntax error : missing ';' before '{'
..\..\..\include\eternity/algorithms.hpp(233) : error C2447: missing function header (old-style formal list?)
..\..\..\include\eternity/algorithms.hpp(251) : error C2954: template definitions cannot nest
..\..\..\include\eternity/algorithms.hpp(267) : error C2059: syntax error : ''template<''
..\..\..\include\eternity/algorithms.hpp(268) : error C2065: 'FirstContent' : undeclared identifier
..\..\..\include\eternity/algorithms.hpp(268) : error C2065: 'SecondContent' : undeclared identifier
..\..\..\include\eternity/algorithms.hpp(285) : error C2143: syntax error : missing ';' before '{'
..\..\..\include\eternity/algorithms.hpp(285) : error C2447: missing function header (old-style formal list?)
..\..\..\include\eternity/algorithms.hpp(304) : error C2954: template definitions cannot nest
..\..\..\include\eternity/algorithms.hpp(304) : error C2059: syntax error : ''template<''
..\..\..\include\eternity/algorithms.hpp(322) : error C2143: syntax error : missing ';' before '{'
..\..\..\include\eternity/algorithms.hpp(322) : error C2447: missing function header (old-style formal list?)
..\..\..\include\eternity/algorithms.hpp(346) : error C2954: template definitions cannot nest

Discussion

  • Jay Kint
    Jay Kint
    2003-07-25

    Logged In: YES
    user_id=97390

    I see the same errors in algorithms.hpp in Visual C++ .NET
    2001. I have not tried 2003.

     
  • Jay Kint
    Jay Kint
    2003-07-30

    Logged In: YES
    user_id=97390

    I was able to "fix" it by a few modifications to algorithm.hpp.
    It does change the usage a small amount too, and it isn't
    working for associations either (yet).

    The problem is that Visual C++ .NET 2001 doesn't support
    templated methods within template classes. It chokes on the
    template <typename T> template<typename U>
    class::method syntax.

    E-mail me at jkint@users.sourceforge.net for the modified
    files and explanation.