(Crypto++5, MSVC6 SP5 + Processor Pack, STLport 4.5.3)

New problem.  I applied the STLport patch kindly posted by Eric Frias, and
it did indeed fix some problems - however, I have a remaining error:

Errors:

N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2275:
'_STL::char_traits' : illegal use of this type as an expression
        N:\_Projects\_libs\cryptlib5.0\integer.cpp(2782) : see reference to
function template instantiation 'class CryptoPP::Integer __cdecl
CryptoPP::StringToInteger(const char *)' being compiled
N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2039: 'length' :
is not a member of '`global namespace''
        N:\_Projects\_libs\cryptlib5.0\integer.cpp(2782) : see reference to
function template instantiation 'class CryptoPP::Integer __cdecl
CryptoPP::StringToInteger(const char *)' being compiled
N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2064: term does
not evaluate to a function
        N:\_Projects\_libs\cryptlib5.0\integer.cpp(2782) : see reference to
function template instantiation 'class CryptoPP::Integer __cdecl
CryptoPP::StringToInteger(const char *)' being compiled
N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2275:
'_STL::char_traits' : illegal use of this type as an expression
        N:\_Projects\_libs\cryptlib5.0\integer.cpp(2788) : see reference to
function template instantiation 'class CryptoPP::Integer __cdecl
CryptoPP::StringToInteger(const unsigned short *)' being compiled
N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2039: 'length' :
is not a member of '`global namespace''
        N:\_Projects\_libs\cryptlib5.0\integer.cpp(2788) : see reference to
function template instantiation 'class CryptoPP::Integer __cdecl
CryptoPP::StringToInteger(const unsigned short *)' being compiled
N:\_Projects\_libs\cryptlib5.0\integer.cpp(2724) : error C2064: term does
not evaluate to a function
        N:\_Projects\_libs\cryptlib5.0\integer.cpp(2788) : see reference to
function template instantiation 'class CryptoPP::Integer __cdecl
CryptoPP::StringToInteger(const unsigned short *)' being compiled
iterhash.cpp


The problem line is at line 2724 in integer.cpp:

unsigned int length = std::char_traits<T>::length(str);


I managed to work around it by uncommenting things to use the GCC
workaround:

//#if (defined(__GNUC__) && __GNUC__ <= 3)  // GCC workaround
 // std::char_traits doesn't exist in GCC 2.x
 // std::char_traits<wchar_t>::length() not defined in GCC 3.2
 unsigned int length;
 for (length = 0; str[length] != 0; length++) {}
//#else
 //unsigned int length = std::char_traits<T>::length(str);
//#endif

Does anyone know how to get 'std::char_traits<T>::length(str)' to work with
STLport?
--
gl

Reply via email to