Skip to content

Fix build errors due to deprecations in MSVC 14.51 (Build Tools 18.6.11806.211)#4917

Merged
Dutchman101 merged 1 commit into
multitheftauto:masterfrom
Dutchman101:msvc-1451-compilefix
May 16, 2026
Merged

Fix build errors due to deprecations in MSVC 14.51 (Build Tools 18.6.11806.211)#4917
Dutchman101 merged 1 commit into
multitheftauto:masterfrom
Dutchman101:msvc-1451-compilefix

Conversation

@Dutchman101
Copy link
Copy Markdown
Member

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.

…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
@Dutchman101
Copy link
Copy Markdown
Member Author

Merging it now, because we need a new 1.7 build

@Dutchman101 Dutchman101 merged commit 5b7f911 into multitheftauto:master May 16, 2026
9 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant