MSVC deprecating stdext::checked_array_iterator

48 views
Skip to first unread message

Stephan T. Lavavej (STL)

unread,
May 8, 2024, 7:52:21 PMMay 8
to Google Breakpad Development
Hi, I maintain MSVC's C++ Standard Library implementation, and we've found that Breakpad's `src/client/windows/crash_generation/minidump_generator.cc` is using `stdext::checked_array_iterator` here.

This was deprecated in `/std:c++17` mode and later by microsoft/STL#3818 in VS 2022 17.8 (which has already shipped). I've since gone further and unconditionally deprecated it with microsoft/STL#4605 shipping in VS 2022 17.11 Preview 2 (not yet available, unless one builds our repo). We still provide fine-grained and coarse-grained escape hatches for this deprecation, but it's best for projects to build warning-free by default. (We encountered this via our "Real World Code" test suite building the RenderDoc project, which uses Breakpad as a dependency.)

To fix this deprecation warning (and be robust for the eventual removal of this iterator), `stdext::checked_array_iterator` should continue to be used before VS 2017 15.8, but otherwise the portable codepath should be used. This version is significant because in VS 2017 15.8, we stopped emitting annoying Microsoft "deprecation" warnings about using raw pointers as output iterators. See MSVC version macro docs for the decoder ring. If and when Breakpad begins requiring VS 2017 15.8 or later (e.g. VS 2019 as a minimum), the `stdext` codepath can simply be dropped.

Thanks,
STL
Reply all
Reply to author
Forward
0 new messages