Fix build errors due to deprecations in MSVC 14.51 (Build Tools 18.6.11806.211)#4917
Merged
Dutchman101 merged 1 commit intoMay 16, 2026
Merged
Conversation
…11806.211), which finally dropped the non-standard stdext namespace from the C++ standard library headers. Build failure was a direct result of the toolchain update: ccc5d7d
Member
Author
|
Merging it now, because we need a new 1.7 build |
Dutchman101
added a commit
that referenced
this pull request
May 16, 2026
…11806.211) (#4917) Fix build errors due to deprecations in MSVC 14.51 (Build Tools 18.6.11806.211), which finally dropped the non-standard stdext namespace from the C++ standard library headers. _Note: the below description is neatly written (high detail) as it may help other OSS projects facing sudden build errors._ MSVC Build Tools 14.51, shipped just now with Visual Studio 2026 18.6.0 on May 12, 2026, unconditionally removes the non-standard stdext namespace from the C++ standard library headers. This removal is documented in the [MSVC Build Tools 14.51 release notes](https://learn.microsoft.com/en-us/cpp/overview/what-s-new-for-msvc) under "Removed features". For our cryptopp, Windows build agents that upgraded its toolchain as per ccc5d7d, began failing with: **error C2653: 'stdext': is not a class or namespace name error C3861: 'make_checked_array_iterator': identifier not found** Two sites in cryptopp use stdext::make_checked_array_iterator and stdext::make_unchecked_array_iterator behind version guards that were only checking a lower bound, with no upper bound keeping in mind a future removal in MSVC Build Tools 14.51. Fix: guard both call sites on defined(_STDEXT_BEGIN), a macro the MSVC STL headers define when stdext is present and omit when it is absent. When the macro is not defined - as is the case with MSVC Build Tools 14.51 and later - both sites fall through to their existing raw-pointer else branches, which are functionally identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix build errors due to deprecations in MSVC 14.51 (Build Tools 18.6.11806.211), which finally dropped the non-standard stdext namespace from the C++ standard library headers.
Note: the below description is neatly written (high detail) as it may help other OSS projects facing sudden build errors.
MSVC Build Tools 14.51, shipped just now with Visual Studio 2026 18.6.0 on May 12, 2026, unconditionally removes the non-standard stdext namespace from the C++ standard library headers. This removal is documented in the MSVC Build Tools 14.51 release notes under "Removed features". For our cryptopp, Windows build agents that upgraded its toolchain as per ccc5d7d, began failing with:
error C2653: 'stdext': is not a class or namespace name
error C3861: 'make_checked_array_iterator': identifier not found
Two sites in cryptopp use stdext::make_checked_array_iterator and stdext::make_unchecked_array_iterator behind version guards that were only checking a lower bound, with no upper bound keeping in mind a future removal in MSVC Build Tools 14.51.
Fix: guard both call sites on defined(_STDEXT_BEGIN), a macro the MSVC STL headers define when stdext is present and omit when it is absent. When the macro is not defined - as is the case with MSVC Build Tools 14.51 and later - both sites fall through to their existing raw-pointer else branches, which are functionally identical.