Closed AlexGuteniev closed 1 year ago
It seems to me that DevCom-241515 is talking about stdext::checked_array_iterator
defined here. IIUC it wants to make stdext::checked_array_iterator<T>
convertible to stdext::checked_array_iterator<const T>
.
@cpplearner, that's correct (except that they're templated on pointers). @AlexGuteniev, std::span::const_iterator
was removed by LWG-3320 for C++20, see GH-542 and GH-548. Thanks for looking into this issue.
I've updated the issue with a comprehensive repro written from scratch, and linked the Microsoft-internal bug to this issue.
Describe the bug The non-Standard extensions
stdext::checked_array_iterator
andstdext::unchecked_array_iterator
don't participate in constness conversions like modern iterators do:https://github.com/microsoft/STL/blob/5ef22f2a884706442257cea3dd9d5a6186f15c07/stl/inc/iterator#L521-L523 https://github.com/microsoft/STL/blob/5ef22f2a884706442257cea3dd9d5a6186f15c07/stl/inc/iterator#L718-L720
Command-line test case
Expected behavior Code should compile.
STL version Visual Studio Community 2019 Preview 16.7.0 Preview 3.1
Additional context This item is also tracked on Developer Community as DevCom-241515 and by Microsoft-internal VSO-146139 / AB#146139.