diff --git a/src/core/include/mp-units/framework/unit_magnitude.h b/src/core/include/mp-units/framework/unit_magnitude.h index 0659c7c5..81b512c6 100644 --- a/src/core/include/mp-units/framework/unit_magnitude.h +++ b/src/core/include/mp-units/framework/unit_magnitude.h @@ -42,7 +42,7 @@ namespace mp_units { MP_UNITS_EXPORT_BEGIN -#if defined MP_UNITS_COMP_CLANG || MP_UNITS_COMP_CLANG < 18 +#if defined MP_UNITS_COMP_CLANG && MP_UNITS_COMP_CLANG < 18 template struct mag_constant { @@ -86,7 +86,7 @@ constexpr UnitMagnitude auto mag_power = pow(mag); /** * @brief A convenient Magnitude constant for pi, which we can manipulate like a regular number. */ -#if defined MP_UNITS_COMP_CLANG || MP_UNITS_COMP_CLANG < 18 +#if defined MP_UNITS_COMP_CLANG && MP_UNITS_COMP_CLANG < 18 inline constexpr struct pi final : mag_constant { static constexpr auto _value_ = std::numbers::pi_v; #else diff --git a/src/core/include/mp-units/framework/unit_magnitude_concepts.h b/src/core/include/mp-units/framework/unit_magnitude_concepts.h index be055212..2586cfef 100644 --- a/src/core/include/mp-units/framework/unit_magnitude_concepts.h +++ b/src/core/include/mp-units/framework/unit_magnitude_concepts.h @@ -38,7 +38,7 @@ import std; namespace mp_units { -#if defined MP_UNITS_COMP_CLANG || MP_UNITS_COMP_CLANG < 18 +#if defined MP_UNITS_COMP_CLANG && MP_UNITS_COMP_CLANG < 18 MP_UNITS_EXPORT template #else MP_UNITS_EXPORT template diff --git a/test/static/unit_symbol_test.cpp b/test/static/unit_symbol_test.cpp index 4a1d01dd..03e44477 100644 --- a/test/static/unit_symbol_test.cpp +++ b/test/static/unit_symbol_test.cpp @@ -142,7 +142,7 @@ static_assert(unit_symbol(mag_ratio<1, 18000> * (metr // static_assert(unit_symbol(mag<1> / mag_power<2, 1, 2> * m) == "(1/2^(1/2) m)"); // magnitude constants -#if defined MP_UNITS_COMP_CLANG || MP_UNITS_COMP_CLANG < 18 +#if defined MP_UNITS_COMP_CLANG && MP_UNITS_COMP_CLANG < 18 inline constexpr struct e final : mag_constant<"e"> { static constexpr long double _value_ = std::numbers::e_v; #else