Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSVC is deprecating stdext::checked_array_iterator #3540

Closed
StephanTLavavej opened this issue Jul 20, 2023 · 1 comment
Closed

MSVC is deprecating stdext::checked_array_iterator #3540

StephanTLavavej opened this issue Jul 20, 2023 · 1 comment

Comments

@StephanTLavavej
Copy link

format.h uses MSVC's stdext::checked_array_iterator:

fmt/include/fmt/format.h

Lines 563 to 565 in 661b23e

#if defined(_SECURE_SCL) && _SECURE_SCL
// Make a checked iterator to avoid MSVC warnings.
template <typename T> using checked_ptr = stdext::checked_array_iterator<T*>;

After microsoft/STL#3818 ships in VS 2022 17.8 Preview 2, this will emit deprecation warnings (in C++17 mode and later). We want to discourage use of this non-Standard extension, towards eliminating it in a future version.

MSVC's STL eliminated the incredibly annoying "copying to a raw pointer" warnings many versions ago (it was VS 2017 15.8, I believe), so you should simply be able to drop this usage of stdext::checked_array_iterator and use portable code for all platforms.

@vitaut
Copy link
Contributor

vitaut commented Jul 20, 2023

Removed all uses of stdext::checked_array_iterator in 9bea6ec. Thanks for letting me know about the deprecation.

@vitaut vitaut closed this as completed Jul 20, 2023
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

No branches or pull requests

2 participants