recently I transform my project from vc6 to vs2005, it occur to the following error:
d:\Program Files\Microsoft Visual Studio 8\VC\ce\include\xtree(1172) : error C3848: expression having type 'const CFormatter::ltwsz' would lose some const-volatile qualifiers in order to call 'bool CFormatter::ltwsz::operator ()(const wchar_t *,const wchar_t *)'
d:\Program Files\Microsoft Visual Studio 8\VC\ce\include\xtree(1167) : while compiling class template member function 'std::_Tree_nod<_Traits>::_Node *std::_Tree<_Traits>::_Lbound(const wchar_t *const &) const'
with
[
_Traits=std::_Tmap_traits>,false>
]
d:\Program Files\Microsoft Visual Studio 8\VC\ce\include\map(82) : see reference to class template instantiation 'std::_Tree<_Traits>' being compiled
with
[
_Traits=std::_Tmap_traits>,false>
]
d:\ccm_wa\jethzh\nav_sdk#arbrbg#1-jethzh#uida35611\tovs2005\nav_sdk\source\hmi\Formatter.h(201) : see reference to class template instantiation 'std::map<_Kty,_Ty,_Pr>' being compiled
with
[
_Kty=const wchar_t *,
_Ty=std::wstring,
_Pr=CFormatter::ltwsz
]
see msdn:
A variable with a specified const-volatile type can only call member functions defined with same or greater const-volatile qualifications.
please modify your code.
详情回复
发表于 2008-2-16 13:24
see msdn:
A variable with a specified const-volatile type can only call member functions defined with same or greater const-volatile qualifications.
please modify your code.