test: unused variable in Release disabled with [[maybe_unused]]

This commit is contained in:
Mateusz Pusz
2021-03-15 18:48:18 +01:00
parent c46ea4460f
commit 53f0b5a4e5

View File

@@ -399,7 +399,7 @@ static_assert(!std::is_assignable_v<abscissa<metre, int>, abscissa<millimetre, i
#if !defined(COMP_MSVC) || defined(NDEBUG) #if !defined(COMP_MSVC) || defined(NDEBUG)
static_assert([]() { static_assert([]() {
const width<metre, int> w(1 * m); const width<metre, int> w(1 * m);
quantity_point_kind x(w); [[maybe_unused]] quantity_point_kind x(w);
assert(&++x == &x && x.relative().common() == 2 * m); assert(&++x == &x && x.relative().common() == 2 * m);
assert(&--x == &x && x.relative().common() == 1 * m); assert(&--x == &x && x.relative().common() == 1 * m);
assert((x++).relative().common() == 1 * m && x.relative().common() == 2 * m); assert((x++).relative().common() == 1 * m && x.relative().common() == 2 * m);