Skip to content

stdext::checked_array_iterator compilation error with VS 2022 17.8 Preview 2 #1768

Open
@kobykahane

Description

@kobykahane

With the latest Visual Studio 2022 Preview, stdext::checked_array_iterator has been deprecated. This results in compile errors like the following when including cpprestsdk's containerstream.h header:

11>...\include\cpprest\containerstream.h(404,47): warning C4996: 'stdext::checked_array_iterator<char *>': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS to suppress this warning.
11>C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33030\include\iterator(1472,1): message : see declaration of 'stdext::checked_array_iterator'
11>C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33030\include\iterator(1472,1): message : class _DEPRECATE_STDEXT_ARR_ITERS checked_array_iterator { // wrap a pointer with checking
11>C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.38.33030\include\iterator(1472,1): message : ^

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