Hewill Kang

Results 8 comments of Hewill Kang

The issue occurs with `_Copy_memmove` too: https://github.com/microsoft/STL/blob/3c1f3d79ea8db9f20ef0854704e3eb131972a606/stl/inc/xutility#L4636 Although I think the `contiguous_iterator`'s difference type should at least have a width greater than or equal to `ptrdiff_t`. testcase: https://godbolt.org/z/Tqhbs7j9v

> In some cases, `range_difference_t` is wider than `range_difference_t` Then the const `begin`/`end` of `slide_view` may also have bugs https://github.com/microsoft/STL/blob/04ee87830a404437f1691d6a3e8809e4986d8493/stl/inc/ranges#L6080-L6084 https://github.com/microsoft/STL/blob/04ee87830a404437f1691d6a3e8809e4986d8493/stl/inc/ranges#L6112-L6121 There may be a narrowing conversion error for `{_Count}`,...

https://github.com/microsoft/STL/blob/04ee87830a404437f1691d6a3e8809e4986d8493/stl/inc/ranges#L2470-L2480 This should be `static_cast(size())` as well, which should have been resolved after implementing [P2393](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2393r1.html).

You might also consider issues like the implicit conversion of `iter_difference_t` to `ptrdiff_t` (which may not be well-formed) in ``.

There is a similarly contrived issue about `slide_view`. https://godbolt.org/z/Ksveer6qq

> At the first glance, I thought we should remove `const` somewhere. It should be investigated whether additional fix is needed for proxy references. Not sure if making `_Upper_bound_unchecked`/`_Lower_bound_unchecked` accept...

> @barcharcraz and I talked about this at the weekly maintainer meeting. The fact that the Majestic Three implementations all reject this code, and the fact that it seems super...

> For the LWG issue part, [LWG-3031](https://cplusplus.github.io/LWG/issue3031) seems roughly related. Quoted from [LWG-3031](https://cplusplus.github.io/LWG/issue3031): > Similar to the Ranges TS design, the P/R below requires `Predicate`, `BinaryPredicate`, and `Compare` to accept...