Bonjour,
j'ai un code source développé sous linux, qui compile donc avec gcc (et VS express 2005 accesoirement) mais pas avec visual studio 6 (que je dois pourtant utiliser pour fusionner avec un autre code). Le problème étant:
c:\savsimth\smaexpr.h(56) : error C2555: 'ValExpr<T>::optim' : overriding virtual function differs from 'SMAExpr::optim' only by return type or calling convention
c:\savsimth\smaexpr.h(28) : see declaration of 'SMAExpr'
c:\savsimth\smaexpr.h(58) : see reference to class template instantiation 'ValExpr<T>' being compiled
c:\savsimth\smaexpr.h(56) : error C2555: 'ValExpr<bool>::optim' : overriding virtual function differs from 'SMAExpr::optim' only by return type or calling convention
c:\savsimth\smaexpr.h(28) : see declaration of 'SMAExpr'
c:\savsimth\smaexpr.h(89) : see reference to class template instantiation 'ValExpr<bool>' being compiled
c:\savsimth\smaexpr.h(100) : error C2555: 'CompExpr::optim' : overriding virtual function differs from 'SMAExpr::optim' only by return type or calling convention
c:\savsimth\smaexpr.h(28) : see declaration of 'SMAExpr'
c:\savsimth\smaexpr.h(56) : error C2555: 'ValExpr<float>::optim' : overriding virtual function differs from 'SMAExpr::optim' only by return type or calling convention
c:\savsimth\smaexpr.h(28) : see declaration of 'SMAExpr'
c:\savsimth\smaexpr.h(112) : see reference to class template instantiation 'ValExpr<float>' being compiled
c:\savsimth\agent.cpp(117) : error C2371: 'si' : redefinition; different basic types
c:\savsimth\agent.cpp(113) : see declaration of 'si'
les codes étant :
virtual SMAExpr* optim() {return this;}
virtual ValExpr<T>* optim() {return this;}
et des scpécialisations dans les sous classes ensuite
Que faire?
Partager