Skip to content

Commit ee40310

Browse files
Drop usage of non-Standard stdext (#1339)
* Drop usage of non-Standard stdext. * Instead add an upper limit to the MSVC version.
1 parent f310d2d commit ee40310

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

integer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3056,7 +3056,7 @@ Integer::Integer(const byte *encodedInteger, size_t byteCount, Signedness s, Byt
30563056
else
30573057
{
30583058
SecByteBlock block(byteCount);
3059-
#if (CRYPTOPP_MSC_VERSION >= 1500)
3059+
#if (CRYPTOPP_MSC_VERSION >= 1500) && (CRYPTOPP_MSC_VERSION < 1938)
30603060
std::reverse_copy(encodedInteger, encodedInteger+byteCount,
30613061
stdext::make_checked_array_iterator(block.begin(), block.size()));
30623062
#else

zdeflate.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,8 @@ unsigned int Deflator::LongestMatch(unsigned int &bestMatch) const
412412
if (scan[bestLength-1] == match[bestLength-1] && scan[bestLength] == match[bestLength] && scan[0] == match[0] && scan[1] == match[1])
413413
{
414414
CRYPTOPP_ASSERT(scan[2] == match[2]);
415-
unsigned int len = (unsigned int)(
416-
#if defined(_STDEXT_BEGIN) && !(defined(CRYPTOPP_MSC_VERSION) && (CRYPTOPP_MSC_VERSION < 1400 || CRYPTOPP_MSC_VERSION >= 1600)) && !defined(_STLPORT_VERSION)
417-
stdext::unchecked_mismatch
418-
#else
419-
std::mismatch
420-
#endif
421-
#if CRYPTOPP_MSC_VERSION >= 1600
415+
unsigned int len = (unsigned int)(std::mismatch
416+
#if (CRYPTOPP_MSC_VERSION >= 1600) && (CRYPTOPP_MSC_VERSION < 1938)
422417
(stdext::make_unchecked_array_iterator(scan)+3, stdext::make_unchecked_array_iterator(scanEnd), stdext::make_unchecked_array_iterator(match)+3).first - stdext::make_unchecked_array_iterator(scan));
423418
#else
424419
(scan+3, scanEnd, match+3).first - scan);

0 commit comments

Comments
 (0)