feat: 💥 from now on dimnensions have to be marked as final

This commit is contained in:
Mateusz Pusz
2024-06-12 14:17:32 +02:00
parent 8977739692
commit 6aa848a456
15 changed files with 59 additions and 62 deletions
@@ -34,7 +34,7 @@ MP_UNITS_EXPORT
namespace mp_units::angular {
// clang-format off
inline constexpr struct dim_angle : base_dimension<"A"> {} dim_angle;
inline constexpr struct dim_angle final : base_dimension<"A"> {} dim_angle;
QUANTITY_SPEC(angle, dim_angle);
QUANTITY_SPEC(solid_angle, pow<2>(angle));
@@ -36,7 +36,7 @@ namespace mp_units::iec80000 {
// dimensions of base quantities
// clang-format off
inline constexpr struct dim_traffic_intensity : base_dimension<"A"> {} dim_traffic_intensity;
inline constexpr struct dim_traffic_intensity final : base_dimension<"A"> {} dim_traffic_intensity;
// clang-format on
// quantities
@@ -35,13 +35,13 @@ namespace mp_units::isq {
// clang-format off
// dimensions of base quantities
inline constexpr struct dim_length : base_dimension<"L"> {} dim_length;
inline constexpr struct dim_mass : base_dimension<"M"> {} dim_mass;
inline constexpr struct dim_time : base_dimension<"T"> {} dim_time;
inline constexpr struct dim_electric_current : base_dimension<"I"> {} dim_electric_current;
inline constexpr struct dim_thermodynamic_temperature : base_dimension<symbol_text{u8"Θ", "O"}> {} dim_thermodynamic_temperature;
inline constexpr struct dim_amount_of_substance : base_dimension<"N"> {} dim_amount_of_substance;
inline constexpr struct dim_luminous_intensity : base_dimension<"J"> {} dim_luminous_intensity;
inline constexpr struct dim_length final : base_dimension<"L"> {} dim_length;
inline constexpr struct dim_mass final : base_dimension<"M"> {} dim_mass;
inline constexpr struct dim_time final : base_dimension<"T"> {} dim_time;
inline constexpr struct dim_electric_current final : base_dimension<"I"> {} dim_electric_current;
inline constexpr struct dim_thermodynamic_temperature final : base_dimension<symbol_text{u8"Θ", "O"}> {} dim_thermodynamic_temperature;
inline constexpr struct dim_amount_of_substance final : base_dimension<"N"> {} dim_amount_of_substance;
inline constexpr struct dim_luminous_intensity final : base_dimension<"J"> {} dim_luminous_intensity;
// clang-format on
// base quantities