-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
<iterator>
: Modernize and deprecate (un)checked_array_iterator
#3818
<iterator>
: Modernize and deprecate (un)checked_array_iterator
#3818
Conversation
tests/std/tests/Dev10_709166_checked_and_unchecked_array_iterator/test.cpp
Outdated
Show resolved
Hide resolved
tests/std/tests/Dev10_709166_checked_and_unchecked_array_iterator/test.cpp
Outdated
Show resolved
Hide resolved
Completing the story of contiguous iterators.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I'll validate and push changes.
"warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory " \ | ||
"functions are non-Standard extensions and will be removed in 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.")]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is debatable whether this should be controlled by the coarse-grained _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
as this is a Microsoft deprecation, not an ISO deprecation. On the other hand, guarding this with _HAS_CXX17
will significantly limit the impact on legacy code (which is good). I suppose I am fine with this; the precedent doesn't even really matter since we are running out of unwise Microsoft extensions to deprecate.
tests/std/tests/Dev10_709166_checked_and_unchecked_array_iterator/test.cpp
Show resolved
Hide resolved
tests/std/tests/Dev10_709166_checked_and_unchecked_array_iterator/test.cpp
Show resolved
Hide resolved
tests/std/tests/Dev10_709166_checked_and_unchecked_array_iterator/test.cpp
Show resolved
Hide resolved
FYI @strega-nil-ms I pushed changes after you approved; probably the most significant being the removal of deprecation on the |
I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed. |
Thanks for enhancing and then discouraging use of this old machinery! 🏚️ 🏡 ✨ |
This deprecation triggered build errors in cpprestsdk: microsoft/cpprestsdk#1768. |
Due to the msvc compiler change in microsoft/STL#3818, the aws-sdk-cpp CI build breaks (warnings are treated as errors). A fix is available upstream when we upgrade our vcpkg ports but to avoid an immediate upgrade, we'll define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING for now.
Due to the msvc compiler change in microsoft/STL#3818, the aws-sdk-cpp CI build breaks (warnings are treated as errors). A fix is available upstream when we upgrade our vcpkg ports but to avoid an immediate upgrade, we'll define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING for now.
Due to the msvc compiler change in microsoft/STL#3818, the aws-sdk-cpp CI build breaks (warnings are treated as errors). A fix is available upstream when we upgrade our vcpkg ports but to avoid an immediate upgrade, we'll define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING for now.
Due to the msvc compiler change in microsoft/STL#3818, the aws-sdk-cpp CI build breaks (warnings are treated as errors). A fix is available upstream when we upgrade our vcpkg ports but to avoid an immediate upgrade, we'll define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING for now.
Fixes #943. Fixes #951.
This PR
(un)checked_array_iterator<T*>
to(un)checked_array_iterator<const T*>
,(un)checked_array_iterator
andmake_(un)checked_array_iterator
in C++17 and later modes, while allowing users to define_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING
to suppress the deprecation,(un)checked_array_iterator<void*>
and(un)checked_array_iterator<Ret(*)(Args...)>
instatic_assert
,iterator_traits<Ptr>::meow
typedefs,make_checked_array_iterator
, and(un)checked_array_iterator
are contiguous iterators in C++20.