feat: quantity_spec support added

This commit is contained in:
Mateusz Pusz
2022-12-16 18:15:48 +01:00
parent e0101f14d9
commit 92c70f1a4e
32 changed files with 1524 additions and 827 deletions
+11 -5
View File
@@ -35,12 +35,18 @@ using namespace units::detail;
using one_ = struct one;
// base dimensions
BASE_DIMENSION_(length, "L");
BASE_DIMENSION_(time, "T");
BASE_DIMENSION_(mass, "M");
BASE_DIMENSION_(thermodynamic_temperature, "Θ");
// clang-format off
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_thermodynamic_temperature_ : base_dimension<basic_symbol_text{"Θ", "O"}> {} dim_thermodynamic_temperature;
// quantities specification
QUANTITY_SPEC_(length, dim_length);
QUANTITY_SPEC_(mass, dim_mass);
QUANTITY_SPEC_(time, dim_time);
QUANTITY_SPEC_(thermodynamic_temperature, dim_thermodynamic_temperature);
// base units
inline constexpr struct second_ : named_unit<"s", time> {} second;
inline constexpr struct metre_ : named_unit<"m", length> {} metre;