From 5f135d11bbc47180a039848021ae8b37b12b1dfb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johel=20Ernesto=20Guerrero=20Pe=C3=B1a?= Date: Sun, 21 Feb 2021 16:59:13 -0400 Subject: [PATCH] fix: check requirement early --- src/include/units/one_rep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/units/one_rep.h b/src/include/units/one_rep.h index 3e5db637..1512420e 100644 --- a/src/include/units/one_rep.h +++ b/src/include/units/one_rep.h @@ -83,9 +83,9 @@ struct one_rep { [[nodiscard]] friend constexpr Rep operator/(one_rep, const Rep&) = delete; template + requires requires { quantity_values::one(); } [[nodiscard]] constexpr operator Rep() const noexcept { - static_assert(QuantityValue); return quantity_values::one(); }