Skip to content

Commit

Permalink
explicit use of slice
Browse files Browse the repository at this point in the history
  • Loading branch information
AnjuDel committed Feb 8, 2021
1 parent ec080ed commit 40dab94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/std/tests/P1614R2_spaceship/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -490,11 +490,11 @@ void ordering_test_cases() {
a[i] = i;
}

const auto a1 = a[std::slice(2, 3, 4)];
const auto a2 = a[std::slice(2, 3, 4)];
const auto a3 = a[std::slice(3, 3, 4)];
const auto a4 = a[std::slice(2, 4, 4)];
const auto a5 = a[std::slice(2, 3, 3)];
std::slice a1 = a[std::slice(2, 3, 4)];
std::slice a2 = a[std::slice(2, 3, 4)];
std::slice a3 = a[std::slice(3, 3, 4)];
std::slice a4 = a[std::slice(2, 4, 4)];
std::slice a5 = a[std::slice(2, 3, 3)];

static_assert((a1 == a2) == true);
static_assert((a1 == a3) == false);
Expand Down

0 comments on commit 40dab94

Please sign in to comment.