Skip to content

Commit

Permalink
Try fixing build error
Browse files Browse the repository at this point in the history
  • Loading branch information
chiphogg committed Dec 18, 2024
1 parent 07888fd commit ddfb90b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions au/code/au/constant.hh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ struct Constant : detail::MakesQuantityFromNumber<Constant, Unit>,
// Convert this constant to a Quantity of the given unit and rep.
template <typename T, typename OtherUnit>
constexpr auto as(OtherUnit u) const {
static_assert(can_store_value_in<T>(u), "Cannot represent constant in this unit/rep");
static_assert(can_store_value_in<T>(OtherUnit{}),
"Cannot represent constant in this unit/rep");
return coerce_as<T>(u);
}

Expand All @@ -69,7 +70,8 @@ struct Constant : detail::MakesQuantityFromNumber<Constant, Unit>,
// Get the value of this constant in the given unit and rep.
template <typename T, typename OtherUnit>
constexpr auto in(OtherUnit u) const {
static_assert(can_store_value_in<T>(u), "Cannot represent constant in this unit/rep");
static_assert(can_store_value_in<T>(OtherUnit{}),
"Cannot represent constant in this unit/rep");
return coerce_in<T>(u);
}

Expand Down

0 comments on commit ddfb90b

Please sign in to comment.