From 0caf998df13c3bde5fd2ca8cc10bb50f978a25bb Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 22 Dec 2022 21:28:49 +0100 Subject: [PATCH] refactor: `reference::operator()` return type constraints improved --- src/core/include/units/reference.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/include/units/reference.h b/src/core/include/units/reference.h index e8987a32..626d7524 100644 --- a/src/core/include/units/reference.h +++ b/src/core/include/units/reference.h @@ -53,7 +53,7 @@ struct reference { template Rep> // TODO can we somehow return an explicit quantity type here? - [[nodiscard]] constexpr Quantity auto operator()(Rep&& value) const + [[nodiscard]] constexpr std::same_as> auto operator()(Rep&& value) const { return quantity(std::forward(value)); }