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:
Mateusz Pusz
2022-05-11 11:59:33 +02:00
parent 725d193122
commit 32b36fb670
66 changed files with 221 additions and 268 deletions
+5 -5
View File
@@ -32,8 +32,8 @@ using namespace units;
namespace fps {
struct foot : named_unit<foot, "ft", no_prefix> {};
struct yard : named_scaled_unit<yard, "yd", no_prefix, ratio(3), foot> {};
struct foot : named_unit<foot, "ft"> {};
struct yard : named_scaled_unit<yard, "yd", ratio(3), foot> {};
struct dim_length : base_dimension<"L", foot> {};
@@ -44,7 +44,7 @@ using length = quantity<dim_length, U, Rep>;
namespace si {
struct metre : named_unit<metre, "m", units::isq::si::prefix> {};
struct metre : named_unit<metre, "m"> {};
struct kilometre : prefixed_unit<kilometre, units::isq::si::kilo, metre> {};
struct dim_length : base_dimension<"L", metre> {};
@@ -54,8 +54,8 @@ using length = quantity<dim_length, U, Rep>;
namespace fps {
struct foot : named_scaled_unit<foot, "ft", no_prefix, ratio(3'048, 1'000, -1), metre> {};
struct yard : named_scaled_unit<yard, "yd", no_prefix, ratio(3), foot> {};
struct foot : named_scaled_unit<foot, "ft", ratio(3'048, 1'000, -1), metre> {};
struct yard : named_scaled_unit<yard, "yd", ratio(3), foot> {};
struct dim_length : base_dimension<"L", foot> {};
@@ -32,7 +32,7 @@
// TODO Fix when Celsius is properly supported (#232)
namespace units::isq::si {
struct degree_celsius : alias_unit<kelvin, basic_symbol_text{"°C", "deg_C"}, no_prefix> {};
struct degree_celsius : alias_unit<kelvin, basic_symbol_text{"°C", "deg_C"}> {};
namespace thermodynamic_temperature_references {
@@ -32,7 +32,7 @@
// TODO Fix when Celsius is properly supported (#232)
namespace units::isq::si {
struct degree_celsius : alias_unit<kelvin, basic_symbol_text{"°C", "deg_C"}, no_prefix> {};
struct degree_celsius : alias_unit<kelvin, basic_symbol_text{"°C", "deg_C"}> {};
namespace thermodynamic_temperature_references {
@@ -32,7 +32,7 @@
// TODO Fix when Celsius is properly supported (#232)
namespace units::isq::si {
struct degree_celsius : alias_unit<kelvin, basic_symbol_text{"°C", "deg_C"}, no_prefix> {};
struct degree_celsius : alias_unit<kelvin, basic_symbol_text{"°C", "deg_C"}> {};
namespace thermodynamic_temperature_references {
+5 -5
View File
@@ -32,8 +32,8 @@ using namespace units;
namespace fps {
struct foot : named_unit<foot, "ft", no_prefix> {};
struct yard : named_scaled_unit<yard, "yd", no_prefix, ratio(3), foot> {};
struct foot : named_unit<foot, "ft"> {};
struct yard : named_scaled_unit<yard, "yd", ratio(3), foot> {};
struct dim_length : base_dimension<"L", foot> {};
@@ -44,7 +44,7 @@ using length = quantity<dim_length, U, Rep>;
namespace si {
struct metre : named_unit<metre, "m", units::isq::si::prefix> {};
struct metre : named_unit<metre, "m"> {};
struct kilometre : prefixed_unit<kilometre, units::isq::si::kilo, metre> {};
struct dim_length : base_dimension<"L", metre> {};
@@ -54,8 +54,8 @@ using length = quantity<dim_length, U, Rep>;
namespace fps {
struct foot : named_scaled_unit<foot, "ft", no_prefix, ratio(3'048, 1'000, -1), metre> {};
struct yard : named_scaled_unit<yard, "yd", no_prefix, ratio(3), foot> {};
struct foot : named_scaled_unit<foot, "ft", ratio(3'048, 1'000, -1), metre> {};
struct yard : named_scaled_unit<yard, "yd", ratio(3), foot> {};
struct dim_length : base_dimension<"L", foot> {};