From 918a8b7e8f1b79a5d4936ac95087a14356fbbaa8 Mon Sep 17 00:00:00 2001 From: Jonas Hoppe <162709928+czjhoppe@users.noreply.github.com> Date: Fri, 30 Aug 2024 13:37:51 +0200 Subject: [PATCH] [msvc][fix] parse error in refernce.h. resolved with more brackets. --- src/core/include/mp-units/framework/reference.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/include/mp-units/framework/reference.h b/src/core/include/mp-units/framework/reference.h index c6424e1f..9bb6b15d 100644 --- a/src/core/include/mp-units/framework/reference.h +++ b/src/core/include/mp-units/framework/reference.h @@ -87,37 +87,40 @@ struct reference { } template - [[nodiscard]] friend consteval detail::reference_t operator*(reference, reference) + [[nodiscard]] friend consteval detail::reference_t<(Q{} * Q2{}), (U{} * U2{})> operator*(reference, reference) { return {}; } template - [[nodiscard]] friend consteval detail::reference_t operator*(reference, U2) + [[nodiscard]] friend consteval detail::reference_t<((Q{} * get_quantity_spec(U2{}))), (U{} * U2{})> operator*(reference, + U2) { return {}; } template - [[nodiscard]] friend consteval detail::reference_t operator*(U1, reference) + [[nodiscard]] friend consteval detail::reference_t<(get_quantity_spec(U1{}) * Q{}), (U1{} * U{})> operator*(U1, + reference) { return {}; } template - [[nodiscard]] friend consteval detail::reference_t operator/(reference, reference) + [[nodiscard]] friend consteval detail::reference_t<(Q{} / Q2{}), (U{} / U2{})> operator/(reference, reference) { return {}; } template - [[nodiscard]] friend consteval detail::reference_t operator/(reference, U2) + [[nodiscard]] friend consteval detail::reference_t<(Q{} / get_quantity_spec(U2{})), (U{} / U2{})> operator/(reference, + U2) { return {}; } template - [[nodiscard]] friend consteval detail::reference_t operator/(U1, reference) + [[nodiscard]] friend consteval detail::reference_t<(get_quantity_spec(U1{}) / Q{}), (U1{} / U{})> operator/(U1, reference) { return {}; }