Skip to content

Debug build fails with MSVC 14.51: stdext::checked_array_iterator removed #12

Closed

Description

@garethsb

Three public headers use the MSVC extension stdext::checked_array_iterator when _ITERATOR_DEBUG_LEVEL is non-zero, which is the default in Debug builds:

  • Release/include/cpprest/containerstream.h
  • Release/include/cpprest/producerconsumerstream.h (two places)
  • Release/include/cpprest/rawptrstream.h (two places)

The MSVC standard library deprecated stdext::checked_array_iterator in VS 2022 17.8, and MSVC Build Tools v14.51 has removed it. So Debug builds of cpprestsdk, and of consumers that include these headers, fail with v14.51:

containerstream.h(404,39): error C2653: 'stdext': is not a class or namespace name

Earlier toolsets report deprecation warning C4996, which also fails when warnings are errors.

Proposed Fix

Apply microsoft/cpprestsdk#1836, open upstream, which removes the uses (+1 −26). It follows an MSVC STL maintainer's advice to remove the uses rather than copy the extension, and it supersedes #1769.

The Debug jobs in Windows CI, on VS 2026 and VS 2022, check the change.

References

Part of #15.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions