refactor: 💥 ! PrefixFamily support removed
It doesn't have much sense to restrict prefixes usage for most units and in many places we were wrong to do so already.
This commit is contained in:
1 parent
725d193122
commit
32b36fb670
66 files changed
+221
-268
No files matched your search
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct gray : named_unit<gray, "Gy", prefix> {};
|
||||
struct gray : named_unit<gray, "Gy"> {};
|
||||
struct yoctogray : prefixed_unit<yoctogray, yocto, gray> {};
|
||||
struct zeptogray : prefixed_unit<zeptogray, zepto, gray> {};
|
||||
struct attogray : prefixed_unit<attogray, atto, gray> {};
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct mole : named_unit<mole, "mol", prefix> {};
|
||||
struct mole : named_unit<mole, "mol"> {};
|
||||
|
||||
struct dim_amount_of_substance : isq::dim_amount_of_substance<mole> {};
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct radian_per_second : named_unit<radian_per_second, basic_symbol_text{"ω", "w"}, prefix> {};
|
||||
struct radian_per_second : named_unit<radian_per_second, basic_symbol_text{"ω", "w"}> {};
|
||||
|
||||
struct dim_angular_velocity :
|
||||
isq::dim_angular_velocity<dim_angular_velocity, radian_per_second, dim_angle<>, dim_time> {};
|
||||
|
||||
@@ -58,7 +58,7 @@ struct square_exametre : derived_deduced_unit<square_exametre, dim_area, exametr
|
||||
struct square_zettametre : derived_deduced_unit<square_zettametre, dim_area, zettametre> {};
|
||||
struct square_yottametre : derived_deduced_unit<square_yottametre, dim_area, yottametre> {};
|
||||
|
||||
struct are : alias_unit<square_decametre, "a", prefix> {};
|
||||
struct are : alias_unit<square_decametre, "a"> {};
|
||||
struct centiare : prefixed_alias_unit<square_metre, centi, are> {};
|
||||
struct deciare : prefixed_unit<deciare, deci, are> {};
|
||||
struct decare : prefixed_unit<decare, deca, are> {};
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct farad : named_unit<farad, "F", prefix> {};
|
||||
struct farad : named_unit<farad, "F"> {};
|
||||
struct yoctofarad : prefixed_unit<yoctofarad, yocto, farad> {};
|
||||
struct zeptofarad : prefixed_unit<zeptofarad, zepto, farad> {};
|
||||
struct attofarad : prefixed_unit<attofarad, atto, farad> {};
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct katal : named_unit<katal, "kat", prefix> {};
|
||||
struct katal : named_unit<katal, "kat"> {};
|
||||
struct yoctokatal : prefixed_unit<yoctokatal, yocto, katal> {};
|
||||
struct zeptokatal : prefixed_unit<zeptokatal, zepto, katal> {};
|
||||
struct attokatal : prefixed_unit<attokatal, atto, katal> {};
|
||||
@@ -58,7 +58,7 @@ struct exakatal : prefixed_unit<exakatal, exa, katal> {};
|
||||
struct zettakatal : prefixed_unit<zettakatal, zetta, katal> {};
|
||||
struct yottakatal : prefixed_unit<yottakatal, yotta, katal> {};
|
||||
|
||||
struct enzyme_unit : named_scaled_unit<enzyme_unit, "U", prefix, ratio(1, 60, -6), katal> {};
|
||||
struct enzyme_unit : named_scaled_unit<enzyme_unit, "U", ratio(1, 60, -6), katal> {};
|
||||
|
||||
struct dim_catalytic_activity :
|
||||
isq::dim_catalytic_activity<dim_catalytic_activity, katal, dim_time, dim_amount_of_substance> {};
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct siemens : named_unit<siemens, "S", prefix> {};
|
||||
struct siemens : named_unit<siemens, "S"> {};
|
||||
struct yoctosiemens : prefixed_unit<yoctosiemens, yocto, siemens> {};
|
||||
struct zeptosiemens : prefixed_unit<zeptosiemens, zepto, siemens> {};
|
||||
struct attosiemens : prefixed_unit<attosiemens, atto, siemens> {};
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct coulomb : named_unit<coulomb, "C", prefix> {};
|
||||
struct coulomb : named_unit<coulomb, "C"> {};
|
||||
|
||||
struct dim_electric_charge : isq::dim_electric_charge<dim_electric_charge, coulomb, dim_time, dim_electric_current> {};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct ampere : named_unit<ampere, "A", prefix> {};
|
||||
struct ampere : named_unit<ampere, "A"> {};
|
||||
struct yoctoampere : prefixed_unit<yoctoampere, yocto, ampere> {};
|
||||
struct zeptoampere : prefixed_unit<zeptoampere, zepto, ampere> {};
|
||||
struct attoampere : prefixed_unit<attoampere, atto, ampere> {};
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct joule : named_unit<joule, "J", prefix> {};
|
||||
struct joule : named_unit<joule, "J"> {};
|
||||
struct yoctojoule : prefixed_unit<yoctojoule, yocto, joule> {};
|
||||
struct zeptojoule : prefixed_unit<zeptojoule, zepto, joule> {};
|
||||
struct attojoule : prefixed_unit<attojoule, atto, joule> {};
|
||||
@@ -55,7 +55,7 @@ struct yottajoule : prefixed_unit<yottajoule, yotta, joule> {};
|
||||
|
||||
// N.B. electron charge (and eV) is an exact constant:
|
||||
// https://www.bipm.org/documents/20126/41483022/SI-Brochure-9.pdf#page=147
|
||||
struct electronvolt : named_scaled_unit<electronvolt, "eV", prefix, ratio(1'602'176'634, 1'000'000'000, -19), joule> {};
|
||||
struct electronvolt : named_scaled_unit<electronvolt, "eV", ratio(1'602'176'634, 1'000'000'000, -19), joule> {};
|
||||
struct gigaelectronvolt : prefixed_unit<gigaelectronvolt, giga, electronvolt> {};
|
||||
|
||||
struct dim_energy : isq::dim_energy<dim_energy, joule, dim_force, dim_length> {};
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct newton : named_unit<newton, "N", prefix> {};
|
||||
struct newton : named_unit<newton, "N"> {};
|
||||
struct yoctonewton : prefixed_unit<yoctonewton, yocto, newton> {};
|
||||
struct zeptonewton : prefixed_unit<zeptonewton, zepto, newton> {};
|
||||
struct attonewton : prefixed_unit<attonewton, atto, newton> {};
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct hertz : named_unit<hertz, "Hz", prefix> {};
|
||||
struct hertz : named_unit<hertz, "Hz"> {};
|
||||
struct yoctohertz : prefixed_unit<yoctohertz, yocto, hertz> {};
|
||||
struct zeptohertz : prefixed_unit<zeptohertz, zepto, hertz> {};
|
||||
struct attohertz : prefixed_unit<attohertz, atto, hertz> {};
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct henry : named_unit<henry, "H", prefix> {};
|
||||
struct henry : named_unit<henry, "H"> {};
|
||||
|
||||
struct yoctohenry : prefixed_unit<yoctohenry, yocto, henry> {};
|
||||
struct zeptohenry : prefixed_unit<zeptohenry, zepto, henry> {};
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct metre : named_unit<metre, "m", prefix> {};
|
||||
struct metre : named_unit<metre, "m"> {};
|
||||
struct yoctometre : prefixed_unit<yoctometre, yocto, metre> {};
|
||||
struct zeptometre : prefixed_unit<zeptometre, zepto, metre> {};
|
||||
struct attometre : prefixed_unit<attometre, atto, metre> {};
|
||||
@@ -56,7 +56,7 @@ struct exametre : prefixed_unit<exametre, exa, metre> {};
|
||||
struct zettametre : prefixed_unit<zettametre, zetta, metre> {};
|
||||
struct yottametre : prefixed_unit<yottametre, yotta, metre> {};
|
||||
|
||||
struct astronomical_unit : named_scaled_unit<astronomical_unit, "au", prefix, ratio(149'597'870'700), metre> {};
|
||||
struct astronomical_unit : named_scaled_unit<astronomical_unit, "au", ratio(149'597'870'700), metre> {};
|
||||
|
||||
struct dim_length : isq::dim_length<metre> {};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct candela : named_unit<candela, "cd", prefix> {};
|
||||
struct candela : named_unit<candela, "cd"> {};
|
||||
struct yoctocandela : prefixed_unit<yoctocandela, yocto, candela> {};
|
||||
struct zeptocandela : prefixed_unit<zeptocandela, zepto, candela> {};
|
||||
struct attocandela : prefixed_unit<attocandela, atto, candela> {};
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct weber : named_unit<weber, "Wb", prefix> {};
|
||||
struct weber : named_unit<weber, "Wb"> {};
|
||||
|
||||
struct yoctoweber : prefixed_unit<yoctoweber, yocto, weber> {};
|
||||
struct zeptoweber : prefixed_unit<zeptoweber, zepto, weber> {};
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct tesla : named_unit<tesla, "T", prefix> {};
|
||||
struct tesla : named_unit<tesla, "T"> {};
|
||||
|
||||
struct yoctotesla : prefixed_unit<yoctotesla, yocto, tesla> {};
|
||||
struct zeptotesla : prefixed_unit<zeptotesla, zepto, tesla> {};
|
||||
@@ -56,7 +56,7 @@ struct exatesla : prefixed_unit<exatesla, exa, tesla> {};
|
||||
struct zettatesla : prefixed_unit<zettatesla, zetta, tesla> {};
|
||||
struct yottatesla : prefixed_unit<yottatesla, yotta, tesla> {};
|
||||
|
||||
struct gauss : named_scaled_unit<gauss, "G", prefix, ratio(1, 10'000), tesla> {};
|
||||
struct gauss : named_scaled_unit<gauss, "G", ratio(1, 10'000), tesla> {};
|
||||
|
||||
struct dim_magnetic_induction :
|
||||
isq::dim_magnetic_induction<dim_magnetic_induction, tesla, dim_voltage, dim_time, dim_length> {};
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct gram : named_unit<gram, "g", prefix> {};
|
||||
struct gram : named_unit<gram, "g"> {};
|
||||
struct yoctogram : prefixed_unit<yoctogram, yocto, gram> {};
|
||||
struct zeptogram : prefixed_unit<zeptogram, zepto, gram> {};
|
||||
struct attogram : prefixed_unit<attogram, atto, gram> {};
|
||||
@@ -56,7 +56,7 @@ struct exagram : prefixed_unit<exagram, exa, gram> {};
|
||||
struct zettagram : prefixed_unit<zettagram, zetta, gram> {};
|
||||
struct yottagram : prefixed_unit<yottagram, yotta, gram> {};
|
||||
|
||||
struct tonne : alias_unit<megagram, "t", prefix> {};
|
||||
struct tonne : alias_unit<megagram, "t"> {};
|
||||
struct yoctotonne : prefixed_alias_unit<attogram, yocto, tonne> {};
|
||||
struct zeptotonne : prefixed_alias_unit<femtogram, zepto, tonne> {};
|
||||
struct attotonne : prefixed_alias_unit<picogram, atto, tonne> {};
|
||||
@@ -78,8 +78,7 @@ struct exatonne : prefixed_alias_unit<yottagram, exa, tonne> {};
|
||||
struct zettatonne : prefixed_unit<zettatonne, zetta, tonne> {};
|
||||
struct yottatonne : prefixed_unit<yottatonne, yotta, tonne> {};
|
||||
|
||||
struct dalton :
|
||||
named_scaled_unit<dalton, "Da", prefix, ratio(16'605'390'666'050, 10'000'000'000'000, -27), kilogram> {};
|
||||
struct dalton : named_scaled_unit<dalton, "Da", ratio(16'605'390'666'050, 10'000'000'000'000, -27), kilogram> {};
|
||||
|
||||
struct dim_mass : isq::dim_mass<kilogram> {};
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct watt : named_unit<watt, "W", prefix> {};
|
||||
struct watt : named_unit<watt, "W"> {};
|
||||
struct yoctowatt : prefixed_unit<yoctowatt, yocto, watt> {};
|
||||
struct zeptowatt : prefixed_unit<zeptowatt, zepto, watt> {};
|
||||
struct attowatt : prefixed_unit<attowatt, atto, watt> {};
|
||||
|
||||
@@ -26,29 +26,27 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct prefix : prefix_family {};
|
||||
|
||||
// clang-format off
|
||||
struct yocto : units::prefix<yocto, prefix, "y", ratio(1, 1, -24)> {};
|
||||
struct zepto : units::prefix<zepto, prefix, "z", ratio(1, 1, -21)> {};
|
||||
struct atto : units::prefix<atto, prefix, "a", ratio(1, 1, -18)> {};
|
||||
struct femto : units::prefix<femto, prefix, "f", ratio(1, 1, -15)> {};
|
||||
struct pico : units::prefix<pico, prefix, "p", ratio(1, 1, -12)> {};
|
||||
struct nano : units::prefix<nano, prefix, "n", ratio(1, 1, -9)> {};
|
||||
struct micro : units::prefix<micro, prefix, basic_symbol_text{"\u00b5", "u"}, ratio(1, 1, -6)> {};
|
||||
struct milli : units::prefix<milli, prefix, "m", ratio(1, 1, -3)> {};
|
||||
struct centi : units::prefix<centi, prefix, "c", ratio(1, 1, -2)> {};
|
||||
struct deci : units::prefix<deci, prefix, "d", ratio(1, 1, -1)> {};
|
||||
struct deca : units::prefix<deca, prefix, "da", ratio(1, 1, 1)> {};
|
||||
struct hecto : units::prefix<hecto, prefix, "h", ratio(1, 1, 2)> {};
|
||||
struct kilo : units::prefix<kilo, prefix, "k", ratio(1, 1, 3)> {};
|
||||
struct mega : units::prefix<mega, prefix, "M", ratio(1, 1, 6)> {};
|
||||
struct giga : units::prefix<giga, prefix, "G", ratio(1, 1, 9)> {};
|
||||
struct tera : units::prefix<tera, prefix, "T", ratio(1, 1, 12)> {};
|
||||
struct peta : units::prefix<peta, prefix, "P", ratio(1, 1, 15)> {};
|
||||
struct exa : units::prefix<exa, prefix, "E", ratio(1, 1, 18)> {};
|
||||
struct zetta : units::prefix<zetta, prefix, "Z", ratio(1, 1, 21)> {};
|
||||
struct yotta : units::prefix<yotta, prefix, "Y", ratio(1, 1, 24)> {};
|
||||
struct yocto : units::prefix<yocto, "y", ratio(1, 1, -24)> {};
|
||||
struct zepto : units::prefix<zepto, "z", ratio(1, 1, -21)> {};
|
||||
struct atto : units::prefix<atto, "a", ratio(1, 1, -18)> {};
|
||||
struct femto : units::prefix<femto, "f", ratio(1, 1, -15)> {};
|
||||
struct pico : units::prefix<pico, "p", ratio(1, 1, -12)> {};
|
||||
struct nano : units::prefix<nano, "n", ratio(1, 1, -9)> {};
|
||||
struct micro : units::prefix<micro, basic_symbol_text{"\u00b5", "u"}, ratio(1, 1, -6)> {};
|
||||
struct milli : units::prefix<milli, "m", ratio(1, 1, -3)> {};
|
||||
struct centi : units::prefix<centi, "c", ratio(1, 1, -2)> {};
|
||||
struct deci : units::prefix<deci, "d", ratio(1, 1, -1)> {};
|
||||
struct deca : units::prefix<deca, "da", ratio(1, 1, 1)> {};
|
||||
struct hecto : units::prefix<hecto, "h", ratio(1, 1, 2)> {};
|
||||
struct kilo : units::prefix<kilo, "k", ratio(1, 1, 3)> {};
|
||||
struct mega : units::prefix<mega, "M", ratio(1, 1, 6)> {};
|
||||
struct giga : units::prefix<giga, "G", ratio(1, 1, 9)> {};
|
||||
struct tera : units::prefix<tera, "T", ratio(1, 1, 12)> {};
|
||||
struct peta : units::prefix<peta, "P", ratio(1, 1, 15)> {};
|
||||
struct exa : units::prefix<exa, "E", ratio(1, 1, 18)> {};
|
||||
struct zetta : units::prefix<zetta, "Z", ratio(1, 1, 21)> {};
|
||||
struct yotta : units::prefix<yotta, "Y", ratio(1, 1, 24)> {};
|
||||
// clang-format on
|
||||
|
||||
} // namespace units::isq::si
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct pascal : named_unit<pascal, "Pa", prefix> {};
|
||||
struct pascal : named_unit<pascal, "Pa"> {};
|
||||
struct yoctopascal : prefixed_unit<yoctopascal, yocto, pascal> {};
|
||||
struct zeptopascal : prefixed_unit<zeptopascal, zepto, pascal> {};
|
||||
struct attopascal : prefixed_unit<attopascal, atto, pascal> {};
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct becquerel : named_unit<becquerel, "Bq", prefix> {};
|
||||
struct becquerel : named_unit<becquerel, "Bq"> {};
|
||||
struct yoctobecquerel : prefixed_unit<yoctobecquerel, yocto, becquerel> {};
|
||||
struct zeptobecquerel : prefixed_unit<zeptobecquerel, zepto, becquerel> {};
|
||||
struct attobecquerel : prefixed_unit<attobecquerel, atto, becquerel> {};
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct ohm : named_unit<ohm, basic_symbol_text{"Ω", "ohm"}, prefix> {};
|
||||
struct ohm : named_unit<ohm, basic_symbol_text{"Ω", "ohm"}> {};
|
||||
struct yoctoohm : prefixed_unit<yoctoohm, yocto, ohm> {};
|
||||
struct zeptoohm : prefixed_unit<zeptoohm, zepto, ohm> {};
|
||||
struct attoohm : prefixed_unit<attoohm, atto, ohm> {};
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct kelvin : named_unit<kelvin, "K", prefix> {};
|
||||
struct kelvin : named_unit<kelvin, "K"> {};
|
||||
|
||||
struct dim_thermodynamic_temperature : isq::dim_thermodynamic_temperature<kelvin> {};
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct second : named_unit<second, "s", prefix> {};
|
||||
struct second : named_unit<second, "s"> {};
|
||||
struct yoctosecond : prefixed_unit<yoctosecond, yocto, second> {};
|
||||
struct zeptosecond : prefixed_unit<zeptosecond, zepto, second> {};
|
||||
struct attosecond : prefixed_unit<attosecond, atto, second> {};
|
||||
@@ -43,9 +43,9 @@ struct picosecond : prefixed_unit<picosecond, pico, second> {};
|
||||
struct nanosecond : prefixed_unit<nanosecond, nano, second> {};
|
||||
struct microsecond : prefixed_unit<microsecond, micro, second> {};
|
||||
struct millisecond : prefixed_unit<millisecond, milli, second> {};
|
||||
struct minute : named_scaled_unit<minute, "min", no_prefix, ratio(60), second> {};
|
||||
struct hour : named_scaled_unit<hour, "h", no_prefix, ratio(60), minute> {};
|
||||
struct day : named_scaled_unit<day, "d", no_prefix, ratio(24), hour> {};
|
||||
struct minute : named_scaled_unit<minute, "min", ratio(60), second> {};
|
||||
struct hour : named_scaled_unit<hour, "h", ratio(60), minute> {};
|
||||
struct day : named_scaled_unit<day, "d", ratio(24), hour> {};
|
||||
|
||||
struct dim_time : isq::dim_time<second> {};
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
namespace units::isq::si {
|
||||
|
||||
struct volt : named_unit<volt, "V", prefix> {};
|
||||
struct volt : named_unit<volt, "V"> {};
|
||||
struct yoctovolt : prefixed_unit<yoctovolt, yocto, volt> {};
|
||||
struct zeptovolt : prefixed_unit<zeptovolt, zepto, volt> {};
|
||||
struct attovolt : prefixed_unit<attovolt, atto, volt> {};
|
||||
|
||||
@@ -58,7 +58,7 @@ struct cubic_exametre : derived_deduced_unit<cubic_exametre, dim_volume, exametr
|
||||
struct cubic_zettametre : derived_deduced_unit<cubic_zettametre, dim_volume, zettametre> {};
|
||||
struct cubic_yottametre : derived_deduced_unit<cubic_yottametre, dim_volume, yottametre> {};
|
||||
|
||||
struct litre : alias_unit<cubic_decimetre, "l", prefix> {};
|
||||
struct litre : alias_unit<cubic_decimetre, "l"> {};
|
||||
struct yoctolitre : prefixed_alias_unit<cubic_nanometre, yocto, litre> {};
|
||||
struct zeptolitre : prefixed_unit<zeptolitre, zepto, litre> {};
|
||||
struct attolitre : prefixed_unit<attolitre, atto, litre> {};
|
||||
|
||||
Reference in new issue
Block a user