зеркало из https://github.com/microsoft/STL.git
Implement LWG-3707: `chunk_view::outer-iterator::value_type::size` should return unsigned type (#2883)
This commit is contained in:
Родитель
da41fe1a74
Коммит
9062b7ff3e
|
@ -5380,7 +5380,8 @@ namespace ranges {
|
|||
_NODISCARD constexpr auto size() const
|
||||
noexcept(noexcept(_RANGES end(_Parent->_Range) - *_Parent->_Current)) /* strengthened */
|
||||
requires sized_sentinel_for<sentinel_t<_Vw>, iterator_t<_Vw>> {
|
||||
return (_STD min)(_Parent->_Remainder, _RANGES end(_Parent->_Range) - *_Parent->_Current);
|
||||
return _To_unsigned_like(
|
||||
(_STD min)(_Parent->_Remainder, _RANGES end(_Parent->_Range) - *_Parent->_Current));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -465,7 +465,8 @@ constexpr bool test_input(Rng&& rng, Expected&& expected) {
|
|||
|
||||
auto val_ty = *outer_iter;
|
||||
if constexpr (sized_sentinel_for<sentinel_t<Rng>, iterator_t<Rng>>) {
|
||||
assert(val_ty.size() == 2);
|
||||
const same_as<_Make_unsigned_like_t<ranges::range_difference_t<V>>> auto s = val_ty.size(); // test LWG-3707
|
||||
assert(s == 2);
|
||||
}
|
||||
|
||||
auto inner_iter = val_ty.begin();
|
||||
|
|
Загрузка…
Ссылка в новой задаче