Skip to content

Commit

Permalink
fix(test): shadowing warnings on gcc fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Nov 16, 2024
1 parent 4aaebb9 commit 4f8e959
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/static/quantity_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,21 +474,21 @@ static_assert((-123 * m).numerical_value_in(m) == -123);
static_assert((+(-123 * m)).numerical_value_in(m) == -123);
static_assert((-(-123 * m)).numerical_value_in(m) == 123);

static_assert([](auto v) {
const auto vv = v++; // NOLINT(bugprone-inc-dec-in-conditions)
return std::pair(v, vv);
static_assert([](auto val) {
const auto vv = val++; // NOLINT(bugprone-inc-dec-in-conditions)
return std::pair(val, vv);
}(123 * m) == std::pair(124 * m, 123 * m));
static_assert([](auto v) {
const auto vv = ++v; // NOLINT(bugprone-inc-dec-in-conditions)
return std::pair(v, vv);
static_assert([](auto val) {
const auto vv = ++val; // NOLINT(bugprone-inc-dec-in-conditions)
return std::pair(val, vv);
}(123 * m) == std::pair(124 * m, 124 * m));
static_assert([](auto v) {
const auto vv = v--; // NOLINT(bugprone-inc-dec-in-conditions)
return std::pair(v, vv);
static_assert([](auto val) {
const auto vv = val--; // NOLINT(bugprone-inc-dec-in-conditions)
return std::pair(val, vv);
}(123 * m) == std::pair(122 * m, 123 * m));
static_assert([](auto v) {
const auto vv = --v; // NOLINT(bugprone-inc-dec-in-conditions)
return std::pair(v, vv);
static_assert([](auto val) {
const auto vv = --val; // NOLINT(bugprone-inc-dec-in-conditions)
return std::pair(val, vv);
}(123 * m) == std::pair(122 * m, 122 * m));

static_assert(is_same_v<decltype((+(short{0} * m)).numerical_value_in(m)), int>);
Expand Down

0 comments on commit 4f8e959

Please sign in to comment.