Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stl/inc/xutility
Original file line number Diff line number Diff line change
Expand Up @@ -3423,7 +3423,7 @@ namespace ranges {
#endif // TRANSITION, LLVM-44833
{
auto& _Self = _Cast();
return _RANGES end(_Self) - _RANGES begin(_Self);
return _STD _To_unsigned_like(_RANGES end(_Self) - _RANGES begin(_Self));
}

#ifdef __clang__ // TRANSITION, LLVM-44833
Expand All @@ -3437,7 +3437,7 @@ namespace ranges {
#endif // TRANSITION, LLVM-44833
{
auto& _Self = _Cast();
return _RANGES end(_Self) - _RANGES begin(_Self);
return _STD _To_unsigned_like(_RANGES end(_Self) - _RANGES begin(_Self));
}

#ifdef __clang__ // TRANSITION, LLVM-44833
Expand Down
9 changes: 4 additions & 5 deletions tests/std/tests/P0896R4_ranges_range_machinery/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,6 @@ namespace exhaustive_size_and_view_test {

using I = int*;
using CI = int const*;
using D = std::ptrdiff_t;
using S = std::size_t;
using UC = unsigned char;

Expand Down Expand Up @@ -1775,10 +1774,10 @@ namespace exhaustive_size_and_view_test {
STATIC_ASSERT(test<strange_view3 const, false, CI, S>());
STATIC_ASSERT(test<strange_view3 const&, false, CI, S>());

STATIC_ASSERT(test<strange_view4, true, I, D>());
STATIC_ASSERT(test<strange_view4&, false, I, D>());
STATIC_ASSERT(test<strange_view4 const, false, CI, D>());
STATIC_ASSERT(test<strange_view4 const&, false, CI, D>());
STATIC_ASSERT(test<strange_view4, true, I, S>());
STATIC_ASSERT(test<strange_view4&, false, I, S>());
STATIC_ASSERT(test<strange_view4 const, false, CI, S>());
STATIC_ASSERT(test<strange_view4 const&, false, CI, S>());

template <class = void>
constexpr bool strict_test_case() {
Expand Down