Skip to content

Commit

Permalink
fix: static_asserts fixed for the older compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Jun 22, 2024
1 parent 8326486 commit 19872bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/include/mp-units/framework/quantity.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class quantity {
requires(!DeltaReference<R2>)
constexpr quantity(Value&&, R2)
{
static_assert(false,
static_assert(DeltaReference<R2>,
"References using offset units (e.g., temperatures) must be explicitly qualified with `delta`");
}

Expand Down
4 changes: 2 additions & 2 deletions src/core/include/mp-units/framework/reference.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ template<typename Rep, Reference R>
[[noreturn]] constexpr auto operator*(Rep&&, R)
{
static_assert(
false,
DeltaReference<R>,
"References using offset units (e.g., temperatures) must be explicitly qualified with `delta` or `absolute`");
}

Expand All @@ -233,7 +233,7 @@ template<typename Rep, Reference R>
[[noreturn]] constexpr auto operator/(Rep&&, R)
{
static_assert(
false,
DeltaReference<R>,
"References using offset units (e.g., temperatures) must be explicitly qualified with `delta` or `absolute`");
}

Expand Down

0 comments on commit 19872bd

Please sign in to comment.