diff --git a/src/core/include/mp-units/bits/quantity_concepts.h b/src/core/include/mp-units/bits/quantity_concepts.h index 6bab015a..437d64e3 100644 --- a/src/core/include/mp-units/bits/quantity_concepts.h +++ b/src/core/include/mp-units/bits/quantity_concepts.h @@ -36,7 +36,6 @@ class quantity; template #else template - requires quantity>::_rep_safe_constructible_ #endif [[nodiscard]] constexpr quantity> make_quantity(Rep&& v); diff --git a/src/core/include/mp-units/quantity.h b/src/core/include/mp-units/quantity.h index cff0d3e5..42204cec 100644 --- a/src/core/include/mp-units/quantity.h +++ b/src/core/include/mp-units/quantity.h @@ -43,11 +43,6 @@ namespace mp_units { namespace detail { -template -concept RepSafeConstructibleFrom = Unit> && std::constructible_from && - (treat_as_floating_point || (!treat_as_floating_point> && - is_rational(get_canonical_unit(U).mag))); - template concept IntegralConversionFactor = Unit && Unit && is_integral(get_canonical_unit(UFrom).mag / get_canonical_unit(UTo).mag); @@ -99,9 +94,6 @@ public: static constexpr Unit auto unit = get_unit(reference); using rep = Rep; - // helper used to constrain `make_quantity()` and `operator*(Representation, Unit)` - static constexpr bool _rep_safe_constructible_ = detail::RepSafeConstructibleFrom; - // static member functions [[nodiscard]] static constexpr quantity zero() noexcept requires requires { quantity_values::zero(); } @@ -329,12 +321,11 @@ private: template #else template - requires quantity>::_rep_safe_constructible_ #endif friend constexpr quantity> make_quantity(Rep2&&); template - requires detail::RepSafeConstructibleFrom + requires std::constructible_from constexpr explicit quantity(Value&& v) : value_(std::forward(v)) { } @@ -443,7 +434,6 @@ template template #else template - requires quantity>::_rep_safe_constructible_ #endif [[nodiscard]] constexpr quantity> make_quantity(Rep&& v) { diff --git a/src/core/include/mp-units/reference.h b/src/core/include/mp-units/reference.h index 8d934206..032c4192 100644 --- a/src/core/include/mp-units/reference.h +++ b/src/core/include/mp-units/reference.h @@ -159,7 +159,6 @@ template Rep> class quantity; template - requires quantity>::_rep_safe_constructible_ [[nodiscard]] constexpr quantity> operator*(Rep&& lhs, R) { return make_quantity(std::forward(lhs));