From 7a83c2b39164873020524d8084a429995c14a568 Mon Sep 17 00:00:00 2001 From: Mateusz Pusz Date: Fri, 20 Sep 2024 10:57:23 -0600 Subject: [PATCH] feat: `iec::var` unit added --- src/systems/include/mp-units/systems/iec/unit_symbols.h | 4 ++++ src/systems/include/mp-units/systems/iec/units.h | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/systems/include/mp-units/systems/iec/unit_symbols.h b/src/systems/include/mp-units/systems/iec/unit_symbols.h index e6f621a9a..08a25c813 100644 --- a/src/systems/include/mp-units/systems/iec/unit_symbols.h +++ b/src/systems/include/mp-units/systems/iec/unit_symbols.h @@ -30,6 +30,10 @@ MP_UNITS_EXPORT namespace mp_units::iec::unit_symbols { +// Electromagnetism +inline constexpr auto var = volt_ampere_reactive_power; + +// Information science and technology // bit inline constexpr auto kbit = si::kilo; inline constexpr auto Mbit = si::mega; diff --git a/src/systems/include/mp-units/systems/iec/units.h b/src/systems/include/mp-units/systems/iec/units.h index 613c2535d..597537b72 100644 --- a/src/systems/include/mp-units/systems/iec/units.h +++ b/src/systems/include/mp-units/systems/iec/units.h @@ -24,6 +24,7 @@ #include #include +#include #include #ifndef MP_UNITS_IN_MODULE_INTERFACE @@ -34,6 +35,10 @@ MP_UNITS_EXPORT namespace mp_units::iec { // clang-format off +// Electromagnetism +inline constexpr struct volt_ampere_reactive_power final : named_unit<"var", si::volt * si::ampere, kind_of> {} volt_ampere_reactive_power; + +// Information science and technology inline constexpr struct erlang final : named_unit<"E", kind_of> {} erlang; inline constexpr struct bit final : named_unit<"bit", one, kind_of> {} bit; inline constexpr struct octet final : named_unit<"o", mag<8> * bit> {} octet;