diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 340caf7c..da13126e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,7 +1,7 @@ # Release notes - **0.7.0 WIP** - - (!) refactor: `ScalableNumber` renamed to `QuantityValue` + - (!) refactor: `ScalableNumber` renamed to `Representation` - (!) refactor: output stream operators moved to the `units/quantity_io.h` header file - (!) refactor: Refactored the library file tree - (!) refactor: `quantity::count()` renamed to `quantity::number()` diff --git a/docs/design/quantity.rst b/docs/design/quantity.rst index 092a2535..8c6b6fd5 100644 --- a/docs/design/quantity.rst +++ b/docs/design/quantity.rst @@ -11,7 +11,7 @@ Interface The difference is that it uses ``double`` as a default representation and has a few additional member types and functions:: - template U, QuantityValue Rep = double> + template U, Representation Rep = double> class quantity { public: using dimension = D; @@ -27,7 +27,7 @@ a few additional member types and functions:: [[nodiscard]] constexpr Quantity auto operator*(const quantity& lhs, const quantity& rhs); - template + template requires std::magma [[nodiscard]] constexpr Quantity auto operator/(const Value& v, const quantity& q); diff --git a/docs/framework/constants.rst b/docs/framework/constants.rst index 47bdb9be..46995c27 100644 --- a/docs/framework/constants.rst +++ b/docs/framework/constants.rst @@ -18,7 +18,7 @@ For example the speed of light constant in :term:`SI` is defined as:: namespace si::si2019 { - template + template inline constexpr auto speed_of_light = speed(299792458); } @@ -27,7 +27,7 @@ The same constant defined for natural units may be provided as:: namespace natural { - template + template inline constexpr auto speed_of_light = speed(1); } diff --git a/docs/framework/dimensions.rst b/docs/framework/dimensions.rst index 46dbc83b..1e9182be 100644 --- a/docs/framework/dimensions.rst +++ b/docs/framework/dimensions.rst @@ -79,8 +79,8 @@ you can use a quantity argument instead of a quantity kind. struct height_kind : kind {}; struct rate_of_climb_kind : derived_kind {}; - template using height = quantity_kind; - template using rate_of_climb = quantity_kind; + template using height = quantity_kind; + template using rate_of_climb = quantity_kind; height h{100 * m}; rate_of_climb rate = h / (25 * s); @@ -92,8 +92,8 @@ you can use a quantity argument instead of a quantity kind. struct width_kind : kind {}; struct horizontal_area_kind : derived_kind {}; - template using width = quantity_kind; - template using horizontal_area = quantity_kind; + template using width = quantity_kind; + template using horizontal_area = quantity_kind; width w{5 * m}; horizontal_area area1 = w * w; diff --git a/docs/framework/quantities.rst b/docs/framework/quantities.rst index d5daf5f1..90479df1 100644 --- a/docs/framework/quantities.rst +++ b/docs/framework/quantities.rst @@ -37,10 +37,10 @@ type to ``double`` by default:: namespace si { - template + template using length = quantity; - template + template using speed = quantity; } @@ -208,7 +208,7 @@ be used:: All instances of `quantity` class always match the `Quantity` concept. All other regular types that are not quantities are called :term:`scalable numbers ` by the library and match the - `QuantityValue` concept. + `Representation` concept. However, the above is not the most important usage of those concepts. Let's assume that the user wants to implement an ``avg_speed`` function that will @@ -318,7 +318,7 @@ are provided:: template concept Dimensionless = QuantityOf; - template + template using dimensionless = quantity; There are two special units provided for usage with such a quantity: diff --git a/docs/reference/core/concepts.rst b/docs/reference/core/concepts.rst index 43c8349d..f2383e3f 100644 --- a/docs/reference/core/concepts.rst +++ b/docs/reference/core/concepts.rst @@ -68,7 +68,7 @@ Concepts satisfy :expr:`Quantity || QuantityLike` recursively (i.e. ``std::optional>``). -.. concept:: template QuantityValue +.. concept:: template Representation A concept matching types that can be used as a `Quantity` representation type. Satisfied by types that match ``(!Quantity) && (!QuantityLike) && (!WrappedQuantity) && std::regular`` diff --git a/docs/use_cases/custom_representation_types.rst b/docs/use_cases/custom_representation_types.rst index 46f16d76..9f561497 100644 --- a/docs/use_cases/custom_representation_types.rst +++ b/docs/use_cases/custom_representation_types.rst @@ -9,11 +9,11 @@ its own custom logic for it (i.e. use a complex number or a measurement class th not only a value but also a measurement error). -A `QuantityValue` concept +A `Representation` concept -------------------------- To support a minimum set of `quantity` operations all custom representation types have to -satisfy at least the `QuantityValue` concept. Which means that they: +satisfy at least the `Representation` concept. Which means that they: - cannot be quantities by themselves, - cannot be wrappers over the `quantity` type (i.e. ``std::optional>``), @@ -103,7 +103,7 @@ The only difference here is that in this case we have to explicitly cast the `qu Additional Requirements ----------------------- -As noted in the previous chapter, the `QuantityValue` concept guarantees us the possibility +As noted in the previous chapter, the `Representation` concept guarantees us the possibility to construct quantities, convert between the units of the same dimension, and compare them for equality. To provide additional `quantity` operations the custom representation type have to satisfy more requirements. @@ -202,7 +202,7 @@ The `quantity` class template has a few static member functions: `quantity::zero representation type. The default implementation is provided through the `quantity_values` class template:: - template + template struct quantity_values { static constexpr Rep zero() noexcept { return Rep(0); } static constexpr Rep one() noexcept { return Rep(1); } @@ -223,7 +223,7 @@ types differently than the integral ones. This behavior can also be extended to representation types with `treat_as_floating_point` customization point which default definition is:: - template + template inline constexpr bool treat_as_floating_point = std::is_floating_point_v; If our representation type should have a floating-point semantics or if it is a class diff --git a/docs/use_cases/extensions.rst b/docs/use_cases/extensions.rst index 97752d64..bbe92202 100644 --- a/docs/use_cases/extensions.rst +++ b/docs/use_cases/extensions.rst @@ -121,7 +121,7 @@ coherent unit:: struct desk_per_hour : deduced_unit {}; // a quantity of our dimension - template U, QuantityValue Rep = double> + template U, Representation Rep = double> using desk_rate = quantity; // a concept matching the above quantity @@ -150,7 +150,7 @@ define a new base dimension, its units, quantity helper, concept, and UDLs:: struct person : named_unit {}; struct dim_people : base_dimension<"people", person> {}; - template U, QuantityValue Rep = double> + template U, Representation Rep = double> using people = quantity; template @@ -169,7 +169,7 @@ With the above we can now define a new derived dimension:: struct person_per_desk : deduced_unit {}; - template U, QuantityValue Rep = double> + template U, Representation Rep = double> using occupancy_rate = quantity; template @@ -216,7 +216,7 @@ Such units do not share their references with base units of other systems: struct dim_length : base_dimension<"L", foot> {}; - template U, QuantityValue Rep = double> + template U, Representation Rep = double> using length = quantity; } // namespace fps @@ -236,7 +236,7 @@ different systems: struct dim_length : base_dimension<"L", metre> {}; - template U, QuantityValue Rep = double> + template U, Representation Rep = double> using length = quantity; namespace fps { @@ -246,7 +246,7 @@ different systems: struct dim_length : base_dimension<"L", foot> {}; - template U, QuantityValue Rep = double> + template U, Representation Rep = double> using length = quantity; } // namespace fps diff --git a/example/custom_systems.cpp b/example/custom_systems.cpp index 82f911c2..10063b09 100644 --- a/example/custom_systems.cpp +++ b/example/custom_systems.cpp @@ -33,7 +33,7 @@ struct yard : named_scaled_unit {}; struct dim_length : base_dimension<"L", foot> {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using length = quantity; } // namespace fps @@ -45,7 +45,7 @@ struct kilometre : prefixed_unit {}; struct dim_length : base_dimension<"L", metre> {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using length = quantity; namespace fps { @@ -55,7 +55,7 @@ struct yard : named_scaled_unit {}; struct dim_length : base_dimension<"L", foot> {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using length = quantity; } // namespace fps diff --git a/example/linear_algebra.cpp b/example/linear_algebra.cpp index 463bfe4b..a06cf8a4 100644 --- a/example/linear_algebra.cpp +++ b/example/linear_algebra.cpp @@ -204,10 +204,10 @@ void matrix_of_quantity_tests() matrix_of_quantity_divide_by_scalar(); } -template +template using length_v = si::length>; -template +template using force_v = si::force>; void quantity_of_vector_add() @@ -277,7 +277,7 @@ void quantity_of_vector_tests() quantity_of_vector_divide_by_scalar(); } -template +template using length_m = si::length>; void quantity_of_matrix_add() diff --git a/example/measurement.cpp b/example/measurement.cpp index da1c8e38..4715ba9d 100644 --- a/example/measurement.cpp +++ b/example/measurement.cpp @@ -120,7 +120,7 @@ private: namespace { -static_assert(units::QuantityValue>); +static_assert(units::Representation>); void example() { diff --git a/src/core/include/units/bits/basic_concepts.h b/src/core/include/units/bits/basic_concepts.h index 4f7f2410..974bccd4 100644 --- a/src/core/include/units/bits/basic_concepts.h +++ b/src/core/include/units/bits/basic_concepts.h @@ -337,7 +337,7 @@ concept QuantityLike = detail::is_quantity_like; template concept QuantityPointLike = detail::is_quantity_point_like; -// QuantityValue +// Representation template concept common_type_with_ = // exposition only @@ -397,7 +397,7 @@ concept wrapped_quantity_ = // exposition only * Satisfied by types that satisfy `(!Quantity) && (!WrappedQuantity) && std::regular`. */ template -concept QuantityValue = +concept Representation = (!Quantity) && (!QuantityLike) && (!wrapped_quantity_) && @@ -413,7 +413,7 @@ template typename quantity_like_traits::rep; requires Dimension::dimension>; requires Unit::unit>; - requires QuantityValue::rep>; + requires Representation::rep>; { quantity_like_traits::number(q) } -> std::convertible_to::rep>; } inline constexpr bool is_quantity_like = true; @@ -425,7 +425,7 @@ template typename quantity_point_like_traits::rep; requires Dimension::dimension>; requires Unit::unit>; - requires QuantityValue::rep>; + requires Representation::rep>; { quantity_point_like_traits::relative(q) } -> QuantityLike; } inline constexpr bool is_quantity_point_like = true; diff --git a/src/core/include/units/bits/common_quantity.h b/src/core/include/units/bits/common_quantity.h index a7970816..1bcc0cfb 100644 --- a/src/core/include/units/bits/common_quantity.h +++ b/src/core/include/units/bits/common_quantity.h @@ -28,16 +28,16 @@ namespace units { -template U, QuantityValue Rep> +template U, Representation Rep> class quantity; -template U, QuantityValue Rep> +template U, Representation Rep> class quantity_point; -template U, QuantityValue Rep> +template U, Representation Rep> class quantity_kind; -template U, QuantityValue Rep> +template U, Representation Rep> class quantity_point_kind; namespace detail { @@ -73,7 +73,7 @@ struct common_quantity_impl, quantity, Rep> } // namespace detail -template Q2, QuantityValue Rep = std::common_type_t> +template Q2, Representation Rep = std::common_type_t> using common_quantity = TYPENAME detail::common_quantity_impl::type; template QP2> diff --git a/src/core/include/units/generic/angle.h b/src/core/include/units/generic/angle.h index f890df86..3c8df30a 100644 --- a/src/core/include/units/generic/angle.h +++ b/src/core/include/units/generic/angle.h @@ -35,7 +35,7 @@ struct dim_angle : base_dimension<"A", U> {}; template concept Angle = QuantityOfT; -template> U, QuantityValue Rep = double> +template> U, Representation Rep = double> using angle = quantity, U, Rep>; inline namespace literals { diff --git a/src/core/include/units/generic/dimensionless.h b/src/core/include/units/generic/dimensionless.h index 021135fb..a4f0175e 100644 --- a/src/core/include/units/generic/dimensionless.h +++ b/src/core/include/units/generic/dimensionless.h @@ -40,7 +40,7 @@ struct dim_one : derived_dimension {}; template concept Dimensionless = QuantityOf; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using dimensionless = quantity; } // namespace units diff --git a/src/core/include/units/quantity.h b/src/core/include/units/quantity.h index a72af05e..3c321d2b 100644 --- a/src/core/include/units/quantity.h +++ b/src/core/include/units/quantity.h @@ -73,11 +73,11 @@ concept safe_castable_to_ = // exposition only template concept quantity_value_for_ = std::regular_invocable && - QuantityValue>; + Representation>; template concept invoke_result_convertible_to_ = - QuantityValue && + Representation && quantity_value_for_ && safe_convertible_to_>; @@ -104,7 +104,7 @@ using quantity_like_type = quantity::dimension, * @tparam U a measurement unit of the quantity * @tparam Rep a type to be used to represent values of a quantity */ -template U, QuantityValue Rep = double> +template U, Representation Rep = double> class quantity { Rep number_; public: @@ -381,8 +381,8 @@ public: }; // CTAD -template -explicit(false) quantity(V) -> quantity; +template +explicit(false) quantity(Rep) -> quantity; template explicit quantity(Q) -> quantity::dimension, typename quantity_like_traits::unit, typename quantity_like_traits::rep>; diff --git a/src/core/include/units/quantity_cast.h b/src/core/include/units/quantity_cast.h index 6009dcd8..655a0720 100644 --- a/src/core/include/units/quantity_cast.h +++ b/src/core/include/units/quantity_cast.h @@ -36,16 +36,16 @@ namespace units { -template U, QuantityValue Rep> +template U, Representation Rep> class quantity; -template U, QuantityValue Rep> +template U, Representation Rep> class quantity_point; -template U, QuantityValue Rep> +template U, Representation Rep> class quantity_kind; -template U, QuantityValue Rep> +template U, Representation Rep> class quantity_point_kind; namespace detail { @@ -211,7 +211,7 @@ template * * @tparam ToRep a representation type to use for a target quantity */ -template Rep> +template Rep> requires std::constructible_from> [[nodiscard]] constexpr auto quantity_cast(const quantity& q) { diff --git a/src/core/include/units/quantity_kind.h b/src/core/include/units/quantity_kind.h index 79cc4177..33cbd4e0 100644 --- a/src/core/include/units/quantity_kind.h +++ b/src/core/include/units/quantity_kind.h @@ -72,7 +72,7 @@ concept QuantityKindRelatedTo = QuantityKind && QuantityKind && * @tparam U the measurement unit of the quantity kind * @tparam Rep the type to be used to represent values of the quantity kind */ -template U, QuantityValue Rep = double> +template U, Representation Rep = double> class quantity_kind { public: using kind_type = K; @@ -239,21 +239,21 @@ public: // Hidden Friends // Below friend functions are to be found via argument-dependent lookup only - template + template [[nodiscard]] friend constexpr QuantityKind auto operator*(const quantity_kind& qk, const Value& v) requires requires(quantity_type q) { { q * v } -> Quantity; } { return detail::make_quantity_kind(qk.common() * v); } - template + template [[nodiscard]] friend constexpr QuantityKind auto operator*(const Value& v, const quantity_kind& qk) requires requires(quantity_type q) { { v * q } -> Quantity; } { return detail::make_quantity_kind(v * qk.common()); } - template + template [[nodiscard]] friend constexpr QuantityKind auto operator/(const quantity_kind& qk, const Value& v) requires requires(quantity_type q) { { q / v } -> Quantity; } { @@ -261,7 +261,7 @@ public: return detail::make_quantity_kind(qk.common() / v); } - template + template [[nodiscard]] friend constexpr QuantityKind auto operator/(const Value& v, const quantity_kind& qk) requires requires(quantity_type q) { { v / q } -> Quantity; } { @@ -269,7 +269,7 @@ public: return detail::downcasted_kind(v / qk.common()); } - template + template [[nodiscard]] friend constexpr QuantityKind auto operator%(const quantity_kind& qk, const Value& v) requires requires(quantity_type q) { q % v; } { diff --git a/src/core/include/units/quantity_point.h b/src/core/include/units/quantity_point.h index 288ed72f..a74793e3 100644 --- a/src/core/include/units/quantity_point.h +++ b/src/core/include/units/quantity_point.h @@ -37,7 +37,7 @@ namespace units { * @tparam U a measurement unit of the quantity point * @tparam Rep a type to be used to represent values of a quantity point */ -template U, QuantityValue Rep = double> +template U, Representation Rep = double> class quantity_point { public: using quantity_type = quantity; @@ -180,8 +180,8 @@ public: }; -template -explicit(false) quantity_point(V) -> quantity_point; +template +explicit(false) quantity_point(Rep) -> quantity_point; template quantity_point(Q) -> quantity_point::dimension, diff --git a/src/core/include/units/quantity_point_kind.h b/src/core/include/units/quantity_point_kind.h index 62142205..63e245bc 100644 --- a/src/core/include/units/quantity_point_kind.h +++ b/src/core/include/units/quantity_point_kind.h @@ -38,7 +38,7 @@ namespace units { * @tparam U the measurement unit of the quantity point kind * @tparam Rep the type to be used to represent values of the quantity point kind */ -template U, QuantityValue Rep = double> +template U, Representation Rep = double> class quantity_point_kind { public: using point_kind_type = PK; diff --git a/src/core/include/units/reference.h b/src/core/include/units/reference.h index 391f8d7a..31e4f388 100644 --- a/src/core/include/units/reference.h +++ b/src/core/include/units/reference.h @@ -27,7 +27,7 @@ namespace units { -template U, QuantityValue Rep> +template U, Representation Rep> class quantity; template U> @@ -102,7 +102,7 @@ struct reference { template [[nodiscard]] friend constexpr reference_divide operator/(reference, R2) { return {}; } - template + template [[nodiscard]] friend constexpr Quantity auto operator*(const Rep& lhs, reference) { return quantity(lhs); diff --git a/src/systems/data/include/units/data/bitrate.h b/src/systems/data/include/units/data/bitrate.h index 19c3ab6e..af7e00be 100644 --- a/src/systems/data/include/units/data/bitrate.h +++ b/src/systems/data/include/units/data/bitrate.h @@ -47,7 +47,7 @@ struct petabit_per_second : deduced_unit concept Bitrate = QuantityOf; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using bitrate = quantity; inline namespace literals { diff --git a/src/systems/data/include/units/data/information.h b/src/systems/data/include/units/data/information.h index 6850a7bd..30298066 100644 --- a/src/systems/data/include/units/data/information.h +++ b/src/systems/data/include/units/data/information.h @@ -57,7 +57,7 @@ struct dim_information : base_dimension<"information", bit> {}; template concept Information = QuantityOf; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using information = quantity; inline namespace literals { diff --git a/src/systems/data/include/units/data/symbolrate.h b/src/systems/data/include/units/data/symbolrate.h index bbd1b92f..4c47def1 100644 --- a/src/systems/data/include/units/data/symbolrate.h +++ b/src/systems/data/include/units/data/symbolrate.h @@ -34,7 +34,7 @@ struct gigabaud : prefixed_alias_unit { struct terabaud : prefixed_alias_unit {}; struct petabaud : prefixed_alias_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using symbolrate = quantity; inline namespace literals { diff --git a/src/systems/isq-natural/include/units/isq/natural/bits/dimensions.h b/src/systems/isq-natural/include/units/isq/natural/bits/dimensions.h index bb9e8b45..274a385c 100644 --- a/src/systems/isq-natural/include/units/isq/natural/bits/dimensions.h +++ b/src/systems/isq-natural/include/units/isq/natural/bits/dimensions.h @@ -29,35 +29,35 @@ namespace units::isq::natural { struct dim_length : isq::dim_length {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using length = quantity; struct dim_time : isq::dim_time {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using time = quantity; struct dim_mass : isq::dim_mass {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using mass = quantity; struct dim_speed : isq::dim_speed {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using speed = quantity; struct dim_acceleration : isq::dim_acceleration {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using acceleration = quantity; struct dim_force : isq::dim_force {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using force = quantity; struct dim_momentum : isq::dim_momentum {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using momentum = quantity; struct dim_energy : isq::dim_energy {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using energy = quantity; // Typical UDLs will not work here as the same units are reused by many quantities. diff --git a/src/systems/isq-natural/include/units/isq/natural/constants.h b/src/systems/isq-natural/include/units/isq/natural/constants.h index b681bafe..b13b9f3b 100644 --- a/src/systems/isq-natural/include/units/isq/natural/constants.h +++ b/src/systems/isq-natural/include/units/isq/natural/constants.h @@ -26,7 +26,7 @@ namespace units::isq::natural { -template +template inline constexpr auto speed_of_light = speed(1); } // namespace units::isq::natural diff --git a/src/systems/si-cgs/include/units/isq/si/cgs/acceleration.h b/src/systems/si-cgs/include/units/isq/si/cgs/acceleration.h index b6b8f950..da7eb009 100644 --- a/src/systems/si-cgs/include/units/isq/si/cgs/acceleration.h +++ b/src/systems/si-cgs/include/units/isq/si/cgs/acceleration.h @@ -31,7 +31,7 @@ namespace units::isq::si::cgs { struct gal : named_unit {}; struct dim_acceleration : isq::dim_acceleration {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using acceleration = quantity; inline namespace literals { diff --git a/src/systems/si-cgs/include/units/isq/si/cgs/area.h b/src/systems/si-cgs/include/units/isq/si/cgs/area.h index 721635d9..d641b9ad 100644 --- a/src/systems/si-cgs/include/units/isq/si/cgs/area.h +++ b/src/systems/si-cgs/include/units/isq/si/cgs/area.h @@ -32,7 +32,7 @@ using si::square_centimetre; struct dim_area : isq::dim_area {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using area = quantity; inline namespace literals { diff --git a/src/systems/si-cgs/include/units/isq/si/cgs/energy.h b/src/systems/si-cgs/include/units/isq/si/cgs/energy.h index dedcb008..4b64ace8 100644 --- a/src/systems/si-cgs/include/units/isq/si/cgs/energy.h +++ b/src/systems/si-cgs/include/units/isq/si/cgs/energy.h @@ -33,7 +33,7 @@ struct erg : named_unit {}; struct dim_energy : isq::dim_energy {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using energy = quantity; inline namespace literals { diff --git a/src/systems/si-cgs/include/units/isq/si/cgs/force.h b/src/systems/si-cgs/include/units/isq/si/cgs/force.h index bed1efec..a99039b7 100644 --- a/src/systems/si-cgs/include/units/isq/si/cgs/force.h +++ b/src/systems/si-cgs/include/units/isq/si/cgs/force.h @@ -34,7 +34,7 @@ struct dyne : named_unit {}; struct dim_force : isq::dim_force {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using force = quantity; inline namespace literals { diff --git a/src/systems/si-cgs/include/units/isq/si/cgs/length.h b/src/systems/si-cgs/include/units/isq/si/cgs/length.h index 5a72fa5b..0042a230 100644 --- a/src/systems/si-cgs/include/units/isq/si/cgs/length.h +++ b/src/systems/si-cgs/include/units/isq/si/cgs/length.h @@ -31,7 +31,7 @@ using si::centimetre; struct dim_length : isq::dim_length {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using length = quantity; inline namespace literals { diff --git a/src/systems/si-cgs/include/units/isq/si/cgs/mass.h b/src/systems/si-cgs/include/units/isq/si/cgs/mass.h index b82c4895..84968df1 100644 --- a/src/systems/si-cgs/include/units/isq/si/cgs/mass.h +++ b/src/systems/si-cgs/include/units/isq/si/cgs/mass.h @@ -31,7 +31,7 @@ using si::gram; struct dim_mass : isq::dim_mass {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using mass = quantity; inline namespace literals { diff --git a/src/systems/si-cgs/include/units/isq/si/cgs/power.h b/src/systems/si-cgs/include/units/isq/si/cgs/power.h index 2adec6e6..6ce921d7 100644 --- a/src/systems/si-cgs/include/units/isq/si/cgs/power.h +++ b/src/systems/si-cgs/include/units/isq/si/cgs/power.h @@ -33,7 +33,7 @@ struct erg_per_second : unit {}; struct dim_power : isq::dim_power {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using power = quantity; inline namespace literals { diff --git a/src/systems/si-cgs/include/units/isq/si/cgs/pressure.h b/src/systems/si-cgs/include/units/isq/si/cgs/pressure.h index 587b08c6..27c8d0fb 100644 --- a/src/systems/si-cgs/include/units/isq/si/cgs/pressure.h +++ b/src/systems/si-cgs/include/units/isq/si/cgs/pressure.h @@ -34,7 +34,7 @@ struct barye : named_unit {}; struct dim_pressure : isq::dim_pressure {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using pressure = quantity; inline namespace literals { diff --git a/src/systems/si-cgs/include/units/isq/si/cgs/speed.h b/src/systems/si-cgs/include/units/isq/si/cgs/speed.h index 89c048b4..59b9022e 100644 --- a/src/systems/si-cgs/include/units/isq/si/cgs/speed.h +++ b/src/systems/si-cgs/include/units/isq/si/cgs/speed.h @@ -32,7 +32,7 @@ namespace units::isq::si::cgs { struct centimetre_per_second : unit {}; struct dim_speed : isq::dim_speed {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using speed = quantity; inline namespace literals { diff --git a/src/systems/si-fps/include/units/isq/si/fps/acceleration.h b/src/systems/si-fps/include/units/isq/si/fps/acceleration.h index dd0c7fc4..1007eea7 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/acceleration.h +++ b/src/systems/si-fps/include/units/isq/si/fps/acceleration.h @@ -31,7 +31,7 @@ namespace units::isq::si::fps { struct foot_per_second_sq : unit {}; struct dim_acceleration : isq::dim_acceleration {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using acceleration = quantity; inline namespace literals { diff --git a/src/systems/si-fps/include/units/isq/si/fps/area.h b/src/systems/si-fps/include/units/isq/si/fps/area.h index b933d124..92a5c0b1 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/area.h +++ b/src/systems/si-fps/include/units/isq/si/fps/area.h @@ -32,7 +32,7 @@ struct square_foot : unit {}; struct dim_area : isq::dim_area {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using area = quantity; inline namespace literals { diff --git a/src/systems/si-fps/include/units/isq/si/fps/density.h b/src/systems/si-fps/include/units/isq/si/fps/density.h index 82a1742e..bc164436 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/density.h +++ b/src/systems/si-fps/include/units/isq/si/fps/density.h @@ -33,7 +33,7 @@ struct pound_per_foot_cub : unit {}; struct dim_density : isq::dim_density {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using density = quantity; inline namespace literals { diff --git a/src/systems/si-fps/include/units/isq/si/fps/energy.h b/src/systems/si-fps/include/units/isq/si/fps/energy.h index b825dfac..8971679e 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/energy.h +++ b/src/systems/si-fps/include/units/isq/si/fps/energy.h @@ -39,7 +39,7 @@ struct foot_pound_force : noble_deduced_unit U, QuantityValue Rep = double> +template U, Representation Rep = double> using energy = quantity; diff --git a/src/systems/si-fps/include/units/isq/si/fps/force.h b/src/systems/si-fps/include/units/isq/si/fps/force.h index 53e87241..3c568556 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/force.h +++ b/src/systems/si-fps/include/units/isq/si/fps/force.h @@ -43,7 +43,7 @@ struct kip : alias_unit {}; struct dim_force : isq::dim_force {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using force = quantity; inline namespace literals { diff --git a/src/systems/si-fps/include/units/isq/si/fps/length.h b/src/systems/si-fps/include/units/isq/si/fps/length.h index 91c436ec..36d2ce02 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/length.h +++ b/src/systems/si-fps/include/units/isq/si/fps/length.h @@ -51,7 +51,7 @@ struct nautical_mile : named_scaled_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using length = quantity; inline namespace literals { diff --git a/src/systems/si-fps/include/units/isq/si/fps/mass.h b/src/systems/si-fps/include/units/isq/si/fps/mass.h index 6e2f5100..318b02f6 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/mass.h +++ b/src/systems/si-fps/include/units/isq/si/fps/mass.h @@ -32,7 +32,7 @@ struct pound : named_scaled_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using mass = quantity; struct grain : named_scaled_unit{}; diff --git a/src/systems/si-fps/include/units/isq/si/fps/power.h b/src/systems/si-fps/include/units/isq/si/fps/power.h index 21afbb3d..1fcf36b5 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/power.h +++ b/src/systems/si-fps/include/units/isq/si/fps/power.h @@ -37,7 +37,7 @@ struct foot_pound_force_per_second : deduced_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using power = quantity; inline namespace literals { diff --git a/src/systems/si-fps/include/units/isq/si/fps/pressure.h b/src/systems/si-fps/include/units/isq/si/fps/pressure.h index b9f8cdad..3e9791a9 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/pressure.h +++ b/src/systems/si-fps/include/units/isq/si/fps/pressure.h @@ -34,7 +34,7 @@ struct poundal_per_foot_sq : unit {}; struct dim_pressure : isq::dim_pressure {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using pressure = quantity; struct pound_force_per_foot_sq : named_scaled_unit {}; diff --git a/src/systems/si-fps/include/units/isq/si/fps/speed.h b/src/systems/si-fps/include/units/isq/si/fps/speed.h index 275b9faa..35c0bbef 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/speed.h +++ b/src/systems/si-fps/include/units/isq/si/fps/speed.h @@ -32,7 +32,7 @@ namespace units::isq::si::fps { struct foot_per_second : unit {}; struct dim_speed : isq::dim_speed {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using speed = quantity; struct mile_per_hour : deduced_unit{}; diff --git a/src/systems/si-fps/include/units/isq/si/fps/volume.h b/src/systems/si-fps/include/units/isq/si/fps/volume.h index 647a025c..e1eabcab 100644 --- a/src/systems/si-fps/include/units/isq/si/fps/volume.h +++ b/src/systems/si-fps/include/units/isq/si/fps/volume.h @@ -33,7 +33,7 @@ struct dim_volume : isq::dim_volume {}; struct cubic_yard : deduced_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using volume = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/absorbed_dose.h b/src/systems/si/include/units/isq/si/absorbed_dose.h index a050c3cf..80f5606c 100644 --- a/src/systems/si/include/units/isq/si/absorbed_dose.h +++ b/src/systems/si/include/units/isq/si/absorbed_dose.h @@ -53,7 +53,7 @@ struct yottagray : prefixed_unit {}; struct dim_absorbed_dose : isq::dim_absorbed_dose {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using absorbed_dose = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/acceleration.h b/src/systems/si/include/units/isq/si/acceleration.h index 97db148d..7f6101f2 100644 --- a/src/systems/si/include/units/isq/si/acceleration.h +++ b/src/systems/si/include/units/isq/si/acceleration.h @@ -31,7 +31,7 @@ namespace units::isq::si { struct metre_per_second_sq : unit {}; struct dim_acceleration : isq::dim_acceleration {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using acceleration = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/amount_of_substance.h b/src/systems/si/include/units/isq/si/amount_of_substance.h index bed70765..ff7303c8 100644 --- a/src/systems/si/include/units/isq/si/amount_of_substance.h +++ b/src/systems/si/include/units/isq/si/amount_of_substance.h @@ -33,7 +33,7 @@ struct mole : named_unit {}; struct dim_amount_of_substance : isq::dim_amount_of_substance {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using amount_of_substance = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/angular_velocity.h b/src/systems/si/include/units/isq/si/angular_velocity.h index 9d59bb85..20d4400f 100644 --- a/src/systems/si/include/units/isq/si/angular_velocity.h +++ b/src/systems/si/include/units/isq/si/angular_velocity.h @@ -34,7 +34,7 @@ struct radian_per_second : named_unit, dim_time> {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using angular_velocity = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/area.h b/src/systems/si/include/units/isq/si/area.h index c5280666..9a9fc279 100644 --- a/src/systems/si/include/units/isq/si/area.h +++ b/src/systems/si/include/units/isq/si/area.h @@ -54,7 +54,7 @@ struct square_yottametre : deduced_unit struct hectare : alias_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using area = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/capacitance.h b/src/systems/si/include/units/isq/si/capacitance.h index 6ba72ea7..4638ba50 100644 --- a/src/systems/si/include/units/isq/si/capacitance.h +++ b/src/systems/si/include/units/isq/si/capacitance.h @@ -54,7 +54,7 @@ struct yottafarad : prefixed_unit {}; struct dim_capacitance : isq::dim_capacitance {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using capacitance = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/catalytic_activity.h b/src/systems/si/include/units/isq/si/catalytic_activity.h index 9eea5965..a1eddee5 100644 --- a/src/systems/si/include/units/isq/si/catalytic_activity.h +++ b/src/systems/si/include/units/isq/si/catalytic_activity.h @@ -56,7 +56,7 @@ struct enzyme_unit : named_scaled_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using catalytic_activity = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/charge_density.h b/src/systems/si/include/units/isq/si/charge_density.h index 98fd5276..73e84a18 100644 --- a/src/systems/si/include/units/isq/si/charge_density.h +++ b/src/systems/si/include/units/isq/si/charge_density.h @@ -36,10 +36,10 @@ struct coulomb_per_metre_sq : unit {}; struct dim_charge_density : isq::dim_charge_density {}; struct dim_surface_charge_density : isq::dim_surface_charge_density {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using charge_density = quantity; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using surface_charge_density = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/concentration.h b/src/systems/si/include/units/isq/si/concentration.h index 70544d8f..a14fb358 100644 --- a/src/systems/si/include/units/isq/si/concentration.h +++ b/src/systems/si/include/units/isq/si/concentration.h @@ -32,7 +32,7 @@ namespace units::isq::si { struct mol_per_metre_cub : unit {}; struct dim_concentration : isq::dim_concentration {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using concentration = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/conductance.h b/src/systems/si/include/units/isq/si/conductance.h index f9ddf04b..ce735537 100644 --- a/src/systems/si/include/units/isq/si/conductance.h +++ b/src/systems/si/include/units/isq/si/conductance.h @@ -49,7 +49,7 @@ struct yottasiemens : prefixed_unit {}; struct dim_conductance : isq::dim_conductance {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using conductance = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/constants.h b/src/systems/si/include/units/isq/si/constants.h index 0c8f7610..44420e98 100644 --- a/src/systems/si/include/units/isq/si/constants.h +++ b/src/systems/si/include/units/isq/si/constants.h @@ -32,31 +32,31 @@ namespace units::isq::si::si2019 { -template +template inline constexpr auto planck_constant = energy(6.62607015e-34) * time(1); -template +template inline constexpr auto reduced_planck_constant = energy(6.582119569e-10) * time(1); -template +template inline constexpr auto elementary_charge = electric_charge(1.602176634e-19); -template +template inline constexpr auto boltzmann_constant = energy(1.380649e-23) / temperature(1); -template +template inline constexpr auto avogadro_constant = Rep(6.02214076e23) / substance(1); -template +template inline constexpr auto speed_of_light = speed(299'792'458); -template +template inline constexpr auto hyperfine_structure_transition_frequency = frequency(9'192'631'770); -// template +// template // inline constexpr auto luminous_efficacy = 683_q_lm / 1_q_W; -template +template inline constexpr auto standard_gravity = acceleration(9.80665); } // namespace units::isq::si::si2019 diff --git a/src/systems/si/include/units/isq/si/current_density.h b/src/systems/si/include/units/isq/si/current_density.h index ff3630bc..06470f69 100644 --- a/src/systems/si/include/units/isq/si/current_density.h +++ b/src/systems/si/include/units/isq/si/current_density.h @@ -34,7 +34,7 @@ struct ampere_per_metre_sq : unit {}; struct dim_current_density : isq::dim_current_density {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using current_density = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/density.h b/src/systems/si/include/units/isq/si/density.h index cd691af4..eb933914 100644 --- a/src/systems/si/include/units/isq/si/density.h +++ b/src/systems/si/include/units/isq/si/density.h @@ -34,7 +34,7 @@ struct kilogram_per_metre_cub : unit {}; struct dim_density : isq::dim_density {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using density = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/dynamic_viscosity.h b/src/systems/si/include/units/isq/si/dynamic_viscosity.h index 6fd2eb4c..8439fd1f 100644 --- a/src/systems/si/include/units/isq/si/dynamic_viscosity.h +++ b/src/systems/si/include/units/isq/si/dynamic_viscosity.h @@ -32,7 +32,7 @@ namespace units::isq::si { struct pascal_second : unit {}; struct dim_dynamic_viscosity : isq::dim_dynamic_viscosity {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using dynamic_viscosity = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/electric_charge.h b/src/systems/si/include/units/isq/si/electric_charge.h index e2866479..23585a4f 100644 --- a/src/systems/si/include/units/isq/si/electric_charge.h +++ b/src/systems/si/include/units/isq/si/electric_charge.h @@ -33,7 +33,7 @@ struct coulomb : named_unit {}; struct dim_electric_charge : isq::dim_electric_charge {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using electric_charge = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/electric_current.h b/src/systems/si/include/units/isq/si/electric_current.h index 1cc34fd6..3405eb3e 100644 --- a/src/systems/si/include/units/isq/si/electric_current.h +++ b/src/systems/si/include/units/isq/si/electric_current.h @@ -53,7 +53,7 @@ struct yottaampere : prefixed_unit {}; struct dim_electric_current : isq::dim_electric_current {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using electric_current = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/electric_field_strength.h b/src/systems/si/include/units/isq/si/electric_field_strength.h index b7155512..a67519c0 100644 --- a/src/systems/si/include/units/isq/si/electric_field_strength.h +++ b/src/systems/si/include/units/isq/si/electric_field_strength.h @@ -31,7 +31,7 @@ namespace units::isq::si { struct volt_per_metre : unit {}; struct dim_electric_field_strength : isq::dim_electric_field_strength {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using electric_field_strength = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/energy.h b/src/systems/si/include/units/isq/si/energy.h index 21a70f12..50efc43d 100644 --- a/src/systems/si/include/units/isq/si/energy.h +++ b/src/systems/si/include/units/isq/si/energy.h @@ -52,7 +52,7 @@ struct gigaelectronvolt : prefixed_unit {} struct dim_energy : isq::dim_energy {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using energy = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/energy_density.h b/src/systems/si/include/units/isq/si/energy_density.h index 9458680f..afcf1c74 100644 --- a/src/systems/si/include/units/isq/si/energy_density.h +++ b/src/systems/si/include/units/isq/si/energy_density.h @@ -32,7 +32,7 @@ namespace units::isq::si { struct joule_per_metre_cub : unit {}; struct dim_energy_density : isq::dim_energy_density {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using energy_density = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/force.h b/src/systems/si/include/units/isq/si/force.h index 9de0e6b3..d75fbae8 100644 --- a/src/systems/si/include/units/isq/si/force.h +++ b/src/systems/si/include/units/isq/si/force.h @@ -54,7 +54,7 @@ struct yottanewton : prefixed_unit {}; struct dim_force : isq::dim_force {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using force = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/frequency.h b/src/systems/si/include/units/isq/si/frequency.h index b65c4682..6207b086 100644 --- a/src/systems/si/include/units/isq/si/frequency.h +++ b/src/systems/si/include/units/isq/si/frequency.h @@ -48,7 +48,7 @@ struct yottahertz : prefixed_unit {}; struct dim_frequency : isq::dim_frequency {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using frequency = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/heat_capacity.h b/src/systems/si/include/units/isq/si/heat_capacity.h index 49a1300a..0d62f39b 100644 --- a/src/systems/si/include/units/isq/si/heat_capacity.h +++ b/src/systems/si/include/units/isq/si/heat_capacity.h @@ -39,13 +39,13 @@ struct dim_heat_capacity : isq::dim_heat_capacity {}; struct dim_molar_heat_capacity : isq::dim_molar_heat_capacity {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using heat_capacity = quantity; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using specific_heat_capacity = quantity; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using molar_heat_capacity = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/inductance.h b/src/systems/si/include/units/isq/si/inductance.h index 8eeca3b9..9c8d4cdd 100644 --- a/src/systems/si/include/units/isq/si/inductance.h +++ b/src/systems/si/include/units/isq/si/inductance.h @@ -50,7 +50,7 @@ struct yottahenry : prefixed_unit {}; struct dim_inductance : isq::dim_inductance {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using inductance = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/length.h b/src/systems/si/include/units/isq/si/length.h index 152e9228..d51b93e8 100644 --- a/src/systems/si/include/units/isq/si/length.h +++ b/src/systems/si/include/units/isq/si/length.h @@ -55,7 +55,7 @@ struct astronomical_unit : named_scaled_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using length = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/luminance.h b/src/systems/si/include/units/isq/si/luminance.h index edb47115..bb0b0e15 100644 --- a/src/systems/si/include/units/isq/si/luminance.h +++ b/src/systems/si/include/units/isq/si/luminance.h @@ -32,7 +32,7 @@ namespace units::isq::si { struct candela_per_metre_sq : unit {}; struct dim_luminance : isq::dim_luminance {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using luminance = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/luminous_intensity.h b/src/systems/si/include/units/isq/si/luminous_intensity.h index bee4716e..d874f9f7 100644 --- a/src/systems/si/include/units/isq/si/luminous_intensity.h +++ b/src/systems/si/include/units/isq/si/luminous_intensity.h @@ -53,7 +53,7 @@ struct yottacandela : prefixed_unit {}; struct dim_luminous_intensity : isq::dim_luminous_intensity {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using luminous_intensity = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/magnetic_flux.h b/src/systems/si/include/units/isq/si/magnetic_flux.h index 69a9e786..a52dd447 100644 --- a/src/systems/si/include/units/isq/si/magnetic_flux.h +++ b/src/systems/si/include/units/isq/si/magnetic_flux.h @@ -50,7 +50,7 @@ struct yottaweber : prefixed_unit {}; struct dim_magnetic_flux : isq::dim_magnetic_flux {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using magnetic_flux = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/magnetic_induction.h b/src/systems/si/include/units/isq/si/magnetic_induction.h index b2b5b152..51b5d9fd 100644 --- a/src/systems/si/include/units/isq/si/magnetic_induction.h +++ b/src/systems/si/include/units/isq/si/magnetic_induction.h @@ -54,7 +54,7 @@ struct gauss : named_scaled_unit {} struct dim_magnetic_induction : isq::dim_magnetic_induction {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using magnetic_induction = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/mass.h b/src/systems/si/include/units/isq/si/mass.h index e31b7203..4f9c46a3 100644 --- a/src/systems/si/include/units/isq/si/mass.h +++ b/src/systems/si/include/units/isq/si/mass.h @@ -77,7 +77,7 @@ struct dalton : named_scaled_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using mass = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/molar_energy.h b/src/systems/si/include/units/isq/si/molar_energy.h index 9fd7728a..0da59154 100644 --- a/src/systems/si/include/units/isq/si/molar_energy.h +++ b/src/systems/si/include/units/isq/si/molar_energy.h @@ -34,7 +34,7 @@ struct joule_per_mole : unit {}; struct dim_molar_energy : isq::dim_molar_energy {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using molar_energy = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/momentum.h b/src/systems/si/include/units/isq/si/momentum.h index 2c5bb3eb..1170277e 100644 --- a/src/systems/si/include/units/isq/si/momentum.h +++ b/src/systems/si/include/units/isq/si/momentum.h @@ -32,7 +32,7 @@ namespace units::isq::si { struct kilogram_metre_per_second : unit {}; struct dim_momentum : isq::dim_momentum {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using momentum = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/permeability.h b/src/systems/si/include/units/isq/si/permeability.h index 2510ce9d..ccfb59a7 100644 --- a/src/systems/si/include/units/isq/si/permeability.h +++ b/src/systems/si/include/units/isq/si/permeability.h @@ -33,7 +33,7 @@ struct henry_per_metre : unit {}; struct dim_permeability : isq::dim_permeability {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using permeability = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/permittivity.h b/src/systems/si/include/units/isq/si/permittivity.h index a141dee3..7ca432c0 100644 --- a/src/systems/si/include/units/isq/si/permittivity.h +++ b/src/systems/si/include/units/isq/si/permittivity.h @@ -33,7 +33,7 @@ struct farad_per_metre : unit {}; struct dim_permittivity : isq::dim_permittivity {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using permittivity = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/power.h b/src/systems/si/include/units/isq/si/power.h index c4e8d4df..3d06db80 100644 --- a/src/systems/si/include/units/isq/si/power.h +++ b/src/systems/si/include/units/isq/si/power.h @@ -49,7 +49,7 @@ struct yottawatt : prefixed_unit {}; struct dim_power : isq::dim_power {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using power = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/pressure.h b/src/systems/si/include/units/isq/si/pressure.h index 904be115..c04da60b 100644 --- a/src/systems/si/include/units/isq/si/pressure.h +++ b/src/systems/si/include/units/isq/si/pressure.h @@ -54,7 +54,7 @@ struct yottapascal : prefixed_unit {}; struct dim_pressure : isq::dim_pressure {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using pressure = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/radioactivity.h b/src/systems/si/include/units/isq/si/radioactivity.h index 47538e55..16c58d16 100644 --- a/src/systems/si/include/units/isq/si/radioactivity.h +++ b/src/systems/si/include/units/isq/si/radioactivity.h @@ -52,7 +52,7 @@ struct yottabecquerel : prefixed_unit {}; struct dim_radioactivity : isq::dim_radioactivity {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using radioactivity = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/resistance.h b/src/systems/si/include/units/isq/si/resistance.h index 9253d90e..7e792232 100644 --- a/src/systems/si/include/units/isq/si/resistance.h +++ b/src/systems/si/include/units/isq/si/resistance.h @@ -50,7 +50,7 @@ struct yottaohm : prefixed_unit {}; struct dim_resistance : isq::dim_resistance {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using resistance = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/speed.h b/src/systems/si/include/units/isq/si/speed.h index a75c8221..531f9aa2 100644 --- a/src/systems/si/include/units/isq/si/speed.h +++ b/src/systems/si/include/units/isq/si/speed.h @@ -34,7 +34,7 @@ struct dim_speed : isq::dim_speed {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using speed = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/surface_tension.h b/src/systems/si/include/units/isq/si/surface_tension.h index b82152ea..d541cfcf 100644 --- a/src/systems/si/include/units/isq/si/surface_tension.h +++ b/src/systems/si/include/units/isq/si/surface_tension.h @@ -32,7 +32,7 @@ struct newton_per_metre : unit {}; struct dim_surface_tension : isq::dim_surface_tension {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using surface_tension = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/thermal_conductivity.h b/src/systems/si/include/units/isq/si/thermal_conductivity.h index 71f0cda5..c8c8da31 100644 --- a/src/systems/si/include/units/isq/si/thermal_conductivity.h +++ b/src/systems/si/include/units/isq/si/thermal_conductivity.h @@ -33,7 +33,7 @@ struct watt_per_metre_kelvin : unit {}; struct dim_thermal_conductivity : isq::dim_thermal_conductivity {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using thermal_conductivity = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/thermodynamic_temperature.h b/src/systems/si/include/units/isq/si/thermodynamic_temperature.h index 0383ffe4..a9e38f78 100644 --- a/src/systems/si/include/units/isq/si/thermodynamic_temperature.h +++ b/src/systems/si/include/units/isq/si/thermodynamic_temperature.h @@ -32,7 +32,7 @@ struct kelvin : named_unit {}; struct dim_thermodynamic_temperature : isq::dim_thermodynamic_temperature {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using thermodynamic_temperature = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/time.h b/src/systems/si/include/units/isq/si/time.h index 91e73c80..35edbb86 100644 --- a/src/systems/si/include/units/isq/si/time.h +++ b/src/systems/si/include/units/isq/si/time.h @@ -44,7 +44,7 @@ struct day : named_scaled_unit {}; struct dim_time : isq::dim_time {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using time = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/torque.h b/src/systems/si/include/units/isq/si/torque.h index 59c4d904..7cb8a835 100644 --- a/src/systems/si/include/units/isq/si/torque.h +++ b/src/systems/si/include/units/isq/si/torque.h @@ -34,7 +34,7 @@ struct newton_metre_per_radian : unit {}; struct dim_torque : isq::dim_torque> {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using torque = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/voltage.h b/src/systems/si/include/units/isq/si/voltage.h index 5a3ae49d..9dad9ae4 100644 --- a/src/systems/si/include/units/isq/si/voltage.h +++ b/src/systems/si/include/units/isq/si/voltage.h @@ -54,7 +54,7 @@ struct yottavolt : prefixed_unit {}; struct dim_voltage : isq::dim_voltage {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using voltage = quantity; inline namespace literals { diff --git a/src/systems/si/include/units/isq/si/volume.h b/src/systems/si/include/units/isq/si/volume.h index 8eded6fd..64281fb9 100644 --- a/src/systems/si/include/units/isq/si/volume.h +++ b/src/systems/si/include/units/isq/si/volume.h @@ -74,7 +74,7 @@ struct exalitre : prefixed_unit {}; struct zettalitre : prefixed_alias_unit {}; struct yottalitre : prefixed_unit {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using volume = quantity; inline namespace literals { diff --git a/test/unit_test/static/concepts_test.cpp b/test/unit_test/static/concepts_test.cpp index 9f7edc71..94d74159 100644 --- a/test/unit_test/static/concepts_test.cpp +++ b/test/unit_test/static/concepts_test.cpp @@ -93,14 +93,14 @@ static_assert(UnitOf); static_assert(UnitOf); static_assert(!UnitOf); -// QuantityValue +// Representation -static_assert(QuantityValue); -static_assert(QuantityValue>); -static_assert(!QuantityValue>); -static_assert(!QuantityValue>>); -static_assert(!QuantityValue); -static_assert(!QuantityValue); +static_assert(Representation); +static_assert(Representation>); +static_assert(!Representation>); +static_assert(!Representation>>); +static_assert(!Representation); +static_assert(!Representation); // Quantity diff --git a/test/unit_test/static/custom_rep_test_min_expl.cpp b/test/unit_test/static/custom_rep_test_min_expl.cpp index f73cead8..1060da14 100644 --- a/test/unit_test/static/custom_rep_test_min_expl.cpp +++ b/test/unit_test/static/custom_rep_test_min_expl.cpp @@ -29,10 +29,10 @@ namespace { * @brief Representation type meeting minimum requirements * * This type with a default Mode = 0 provides the minimum set of requirements to - * satisfy @c QuantityValue concept which is used for quantity's representation type. + * satisfy @c Representation concept which is used for quantity's representation type. * * In case of Mode != 0 only one of mandatory operation is removed which should - * result in @c QuantityValue concept not being satisfied. + * result in @c Representation concept not being satisfied. * * @tparam Mode a flag to disable specific type's operations */ @@ -140,20 +140,20 @@ static_assert(!std::constructible_from, dimensionless>, length>); // all operations needed to satisfy concept -static_assert(QuantityValue>); -static_assert(!QuantityValue>); -static_assert(!QuantityValue>); -static_assert(!QuantityValue>); +static_assert(Representation>); +static_assert(!Representation>); +static_assert(!Representation>); +static_assert(!Representation>); #if !defined(UNITS_COMP_GCC) || UNITS_COMP_GCC > 10 || UNITS_COMP_GCC_MINOR > 1 -static_assert(!QuantityValue>); +static_assert(!Representation>); #endif -static_assert(!QuantityValue>); +static_assert(!Representation>); #if !defined(UNITS_COMP_GCC) || UNITS_COMP_GCC > 10 || UNITS_COMP_GCC_MINOR > 1 -static_assert(!QuantityValue>); +static_assert(!Representation>); #endif -static_assert(!QuantityValue>); -static_assert(!QuantityValue>); -static_assert(!QuantityValue>); +static_assert(!Representation>); +static_assert(!Representation>); +static_assert(!Representation>); // quantity's operators should mirror the representation type capabilities template diff --git a/test/unit_test/static/custom_rep_test_min_impl.cpp b/test/unit_test/static/custom_rep_test_min_impl.cpp index 8b9534de..b2fc2f39 100644 --- a/test/unit_test/static/custom_rep_test_min_impl.cpp +++ b/test/unit_test/static/custom_rep_test_min_impl.cpp @@ -62,8 +62,8 @@ namespace { using namespace units; using namespace units::isq::si; -static_assert(QuantityValue>); -static_assert(QuantityValue>); +static_assert(Representation>); +static_assert(Representation>); // construction from a value static_assert(std::constructible_from>, min_impl>); diff --git a/test/unit_test/static/custom_unit_test.cpp b/test/unit_test/static/custom_unit_test.cpp index 75ac3a0e..f456109c 100644 --- a/test/unit_test/static/custom_unit_test.cpp +++ b/test/unit_test/static/custom_unit_test.cpp @@ -36,14 +36,14 @@ using namespace units::isq::si; struct sq_volt_per_hertz : unit {}; struct dim_power_spectral_density : derived_dimension, units::exponent> {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using power_spectral_density = quantity; // amplitude spectral density struct volt_per_sqrt_hertz : unit {}; struct dim_amplitude_spectral_density : derived_dimension, units::exponent> {}; -template U, QuantityValue Rep = double> +template U, Representation Rep = double> using amplitude_spectral_density = quantity; } diff --git a/test/unit_test/static/quantity_kind_test.cpp b/test/unit_test/static/quantity_kind_test.cpp index 6c73ed79..cb072fe2 100644 --- a/test/unit_test/static/quantity_kind_test.cpp +++ b/test/unit_test/static/quantity_kind_test.cpp @@ -58,17 +58,17 @@ struct time_kind : kind {}; struct cgs_width_kind : kind {}; -template using radius = quantity_kind; -template using width = quantity_kind; -template using height = quantity_kind; +template using radius = quantity_kind; +template using width = quantity_kind; +template using height = quantity_kind; -template using horizontal_area = quantity_kind; -template using rate_of_climb = quantity_kind; +template using horizontal_area = quantity_kind; +template using rate_of_climb = quantity_kind; -template using apples = quantity_kind; -template using oranges = quantity_kind; +template using apples = quantity_kind; +template using oranges = quantity_kind; -template using cgs_width = quantity_kind; +template using cgs_width = quantity_kind; ///////////// // concepts diff --git a/test/unit_test/static/quantity_point_kind_test.cpp b/test/unit_test/static/quantity_point_kind_test.cpp index 0eba1ae1..34dbe278 100644 --- a/test/unit_test/static/quantity_point_kind_test.cpp +++ b/test/unit_test/static/quantity_point_kind_test.cpp @@ -64,21 +64,21 @@ struct nth_orange_kind : point_kind {}; struct time_kind : kind {}; struct time_point_kind : point_kind {}; -template using width = quantity_kind; -template using height = quantity_kind; -template using abscissa = quantity_point_kind; -template using ordinate = quantity_point_kind; +template using width = quantity_kind; +template using height = quantity_kind; +template using abscissa = quantity_point_kind; +template using ordinate = quantity_point_kind; -template using distance = quantity_kind; -template using cgs_width = quantity_kind; -template using cgs_height = quantity_kind; -template using rate_of_climb = quantity_kind; -template using altitude = quantity_point_kind; +template using distance = quantity_kind; +template using cgs_width = quantity_kind; +template using cgs_height = quantity_kind; +template using rate_of_climb = quantity_kind; +template using altitude = quantity_point_kind; -template using apples = quantity_kind; -template using oranges = quantity_kind; -template using nth_apple = quantity_point_kind; -template using nth_orange = quantity_point_kind; +template using apples = quantity_kind; +template using oranges = quantity_kind; +template using nth_apple = quantity_point_kind; +template using nth_orange = quantity_point_kind; ///////////// // concepts