fix: check requirement early

This commit is contained in:
Johel Ernesto Guerrero Peña authored and Mateusz Pusz committed 2021-03-15 14:26:46 +01:00
1 parent 69fac6b695
commit 5f135d11bb
1 file changed
+1 -1
+1 -1
View File
@@ -83,9 +83,9 @@ struct one_rep {
[[nodiscard]] friend constexpr Rep operator/(one_rep, const Rep&) = delete;
template<typename Rep>
requires requires { quantity_values<Rep>::one(); }
[[nodiscard]] constexpr operator Rep() const noexcept
{
static_assert(QuantityValue<Rep>);
return quantity_values<Rep>::one();
}