Skip to content

Commit

Permalink
fix: compilation errors after the last commit fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mpusz committed Jan 19, 2024
1 parent b4f07f6 commit d036af5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/core/include/mp-units/quantity.h
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ class quantity {
return std::forward<Q>(lhs);
}

template<typename Q1, QuantityOf<dimension_one> Q2>
template<typename Q1, QuantityOf<dimensionless> Q2>
requires std::derived_from<std::remove_cvref_t<Q1>, quantity> && (Q2::unit == ::mp_units::one) &&
requires(rep a, const typename Q2::rep b) {
{
Expand All @@ -389,7 +389,7 @@ class quantity {
return std::forward<Q>(lhs);
}

template<typename Q1, QuantityOf<dimension_one> Q2>
template<typename Q1, QuantityOf<dimensionless> Q2>
requires std::derived_from<std::remove_cvref_t<Q1>, quantity> && (Q2::unit == ::mp_units::one) &&
requires(rep a, const typename Q2::rep b) {
{
Expand Down
1 change: 0 additions & 1 deletion test/static/quantity_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,6 @@ static_assert(QuantityOf<quantity<m / s>, isq::position_vector / isq::duration>)
static_assert(QuantityOf<quantity<kind_of<isq::speed>[m / s]>, isq::position_vector / isq::duration>);
static_assert(QuantityOf<quantity<isq::velocity[m / s], int>, isq::position_vector / isq::duration>);

static_assert(QuantityOf<decltype(10 * isq::speed[m / s] / (2 * isq::length[m]) * (4 * isq::time[s])), dimension_one>);
static_assert(QuantityOf<decltype(10 * m), isq::height>); // kind of
static_assert(QuantityOf<decltype(10 * kind_of<isq::length>[m]), isq::height>); // kind of
static_assert(!QuantityOf<decltype(10 * isq::length[m]), isq::height>); // different kinds
Expand Down

0 comments on commit d036af5

Please sign in to comment.