From b00cff8ec8b8c80eee3ffcc7d422859e65121d59 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Tue, 11 May 2021 19:38:14 +0200 Subject: [PATCH] refactor: `quantity_point` construction now relays only on a construction of a `quantity_type` Relates to #221 --- src/core/include/units/quantity_point.h | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/core/include/units/quantity_point.h b/src/core/include/units/quantity_point.h index 93c38615..cbb5e2a7 100644 --- a/src/core/include/units/quantity_point.h +++ b/src/core/include/units/quantity_point.h @@ -59,16 +59,9 @@ public: quantity_point(const quantity_point&) = default; quantity_point(quantity_point&&) = default; - template - requires std::same_as && - safe_convertible_to_, rep> && - std::constructible_from - constexpr explicit quantity_point(Value&& v) : q_(std::forward(v)) {} - - template - requires (Quantity> || QuantityLike>) && - std::constructible_from - constexpr explicit quantity_point(Q&& q) : q_(std::forward(q)) {} + template + requires std::constructible_from + constexpr explicit quantity_point(T&& t) : q_(std::forward(t)) {} template requires std::convertible_to