From 814b731696c290060c14e09e0f684b7ec06e10de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Sch=C3=A4pers?= Date: Tue, 23 May 2023 22:53:00 +0200 Subject: [PATCH] Work around Windows macro --- src/systems/si/include/mp-units/systems/si/units.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/systems/si/include/mp-units/systems/si/units.h b/src/systems/si/include/mp-units/systems/si/units.h index bc717de6..cfc851f7 100644 --- a/src/systems/si/include/mp-units/systems/si/units.h +++ b/src/systems/si/include/mp-units/systems/si/units.h @@ -45,7 +45,16 @@ inline constexpr struct radian : named_unit<"rad", metre / metre, kind_of / square, kind_of> {} steradian; inline constexpr struct hertz : named_unit<"Hz", 1 / second, kind_of> {} hertz; inline constexpr struct newton : named_unit<"N", kilogram * metre / square> {} newton; +#ifdef pascal +#pragma push_macro("pascal") +#undef pascal +#define UNITS_REDEFINE_PASCAL +#endif inline constexpr struct pascal : named_unit<"Pa", newton / square> {} pascal; +#ifdef UNITS_REDEFINE_PASCAL +#pragma pop_macro("pascal") +#undef UNITS_REDEFINE_PASCAL +#endif inline constexpr struct joule : named_unit<"J", newton * metre> {} joule; inline constexpr struct watt : named_unit<"W", joule / second> {} watt; inline constexpr struct coulomb : named_unit<"C", ampere * second> {} coulomb;