From 60cec6020bf090d9ed0dbdcb72c3836387423af3 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Thu, 1 Dec 2022 20:15:52 +0100 Subject: [PATCH] fix: MSVC-193 compilation issue workaround Closes #403 --- src/core/include/units/quantity.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/include/units/quantity.h b/src/core/include/units/quantity.h index 5ae8b111..6920dcde 100644 --- a/src/core/include/units/quantity.h +++ b/src/core/include/units/quantity.h @@ -42,7 +42,10 @@ namespace detail { template // TODO: Replace with `v * R` pending https://github.com/BobSteagall/wg21/issues/58. inline constexpr auto make_quantity = [](auto&& v) { using Rep = std::remove_cvref_t; - return quantity(std::forward(v)); + using ref_type = decltype(R); + using dimension = TYPENAME ref_type::dimension; + using unit = TYPENAME ref_type::unit; + return quantity(std::forward(v)); }; template