fix: ω, au, and Da allowed to have SI prefixes

Relates to #359
This commit is contained in:
Mateusz Pusz
2022-04-27 19:33:44 +02:00
parent 4361cb874e
commit fbc6744bdb
3 changed files with 4 additions and 3 deletions

View File

@@ -29,12 +29,13 @@
// IWYU pragma: end_exports // IWYU pragma: end_exports
#include <units/generic/angle.h> #include <units/generic/angle.h>
#include <units/isq/si/prefixes.h>
#include <units/isq/si/time.h> #include <units/isq/si/time.h>
#include <units/unit.h> #include <units/unit.h>
namespace units::isq::si { namespace units::isq::si {
struct radian_per_second : named_unit<radian_per_second, basic_symbol_text{"ω", "w"}, no_prefix> {}; struct radian_per_second : named_unit<radian_per_second, basic_symbol_text{"ω", "w"}, prefix> {};
struct dim_angular_velocity : struct dim_angular_velocity :
isq::dim_angular_velocity<dim_angular_velocity, radian_per_second, dim_angle<>, dim_time> {}; isq::dim_angular_velocity<dim_angular_velocity, radian_per_second, dim_angle<>, dim_time> {};

View File

@@ -56,7 +56,7 @@ struct exametre : prefixed_unit<exametre, exa, metre> {};
struct zettametre : prefixed_unit<zettametre, zetta, metre> {}; struct zettametre : prefixed_unit<zettametre, zetta, metre> {};
struct yottametre : prefixed_unit<yottametre, yotta, metre> {}; struct yottametre : prefixed_unit<yottametre, yotta, metre> {};
struct astronomical_unit : named_scaled_unit<astronomical_unit, "au", no_prefix, ratio(149'597'870'700), metre> {}; struct astronomical_unit : named_scaled_unit<astronomical_unit, "au", prefix, ratio(149'597'870'700), metre> {};
struct dim_length : isq::dim_length<metre> {}; struct dim_length : isq::dim_length<metre> {};

View File

@@ -79,7 +79,7 @@ struct zettatonne : prefixed_unit<zettatonne, zetta, tonne> {};
struct yottatonne : prefixed_unit<yottatonne, yotta, tonne> {}; struct yottatonne : prefixed_unit<yottatonne, yotta, tonne> {};
struct dalton : struct dalton :
named_scaled_unit<dalton, "Da", no_prefix, ratio(16'605'390'666'050, 10'000'000'000'000, -27), kilogram> {}; named_scaled_unit<dalton, "Da", prefix, ratio(16'605'390'666'050, 10'000'000'000'000, -27), kilogram> {};
struct dim_mass : isq::dim_mass<kilogram> {}; struct dim_mass : isq::dim_mass<kilogram> {};