Thanks. Is this also specific to MSVC? Sould I do
"#if (defined(_MSC_VER) && defined(_STLP_VERSION))" around this workaround?

On Fri, Nov 22, 2002 at 04:52:47PM -0500, Eric Frias wrote:
> Here's a patch for Crypto++ version 5.0 to get it to compile with STLport
> with Microsoft Visual C++ 7.0.  The compile problem was previously reported
> by Arik here (reported for C++ 6.0, but the error message was the same):
> http://www.escribe.com/software/crypto/m2229.html
> 
> Here is the thread on STLport's online forum that lead me to the solution:
> http://www.stlport.com/dcforum/DCForumID10/13.html
> 
> Here is the patch.  You might want to guard it with #ifdef _STLP_VERSION,
> because I think it is a STLport-specific workaround.
> 
> Eric
> 
> *** ../cryptopp-virgin/secblock.h Tue Sep  3 14:54:00 2002
> --- secblock.h Fri Nov 22 16:39:49 2002
> ***************
> *** 371,376 ****
> --- 371,382 ----
>    a.swap(b);
>   }
> 
> + template <class _Tp1, class _Tp2>
> + inline CryptoPP::AllocatorWithCleanup<_Tp2>&
> + __stl_alloc_rebind(CryptoPP::AllocatorWithCleanup<_Tp1>& __a, const _Tp2*)
> {
> +   return (CryptoPP::AllocatorWithCleanup<_Tp2>&)(__a);
> + }
> +
>   NAMESPACE_END
> 
>   #endif
> 
> 

Reply via email to