Drop usage of non-Standard stdext
#1339
Open
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.
Fixes #1250.
I'm the primary maintainer of MSVC's C++ Standard Library. We build popular open-source projects, including cryptopp, with development builds of our toolset in order to find and fix regressions in the compiler and libraries before they can ship and cause trouble for you. This also allows us to provide advance notice of breaking changes, which is the case here.
Long ago, we used to emit incredibly obnoxious warnings about using raw pointers as output iterators, which could be avoided by using our non-Standard
stdext::checked_array_iteratororstdext::unchecked_array_iterator. Those warnings were removed in VS 2017 15.8, released in August 2018.Later, we deprecated these
stdextiterators for C++17 and later in VS 2022 17.8 in November 2023, as reported by #1250. We then strengthened the deprecation to be unconditional (i.e. also C++14 mode) in VS 2022 17.11 in August 2024.They're still present (and deprecated) in the MSVC Build Tools 14.50 which will be shipping in VS 2026 18.0. However, I've completely removed them in the MSVC Build Tools 14.51 (with microsoft/STL#5817), which will ship in a future update to VS 2026 18.x.
Now that the
stdextiterators are no longer needed to avoid obnoxious warnings, their usage can simply be removed, calling Standard algorithms with raw pointers directly.I also took this opportunity to remove a strange-looking call to
stdext::unchecked_mismatchthat appeared to be used for only certain old versions of MSVC, although I don't understand what was happening there (I've worked on the STL since 2007 and I've never seen such an algorithm in thestdextnamespace). In any event, calling Standardmismatchis the right thing to do.