diff --git a/docs/DESIGN.md b/docs/DESIGN.md index da77b31f..0e7f2a81 100644 --- a/docs/DESIGN.md +++ b/docs/DESIGN.md @@ -134,8 +134,8 @@ struct no_prefix : prefix_family {}; Concrete prefix derives from a `prefix` class template: ```cpp -template - requires (!std::same_as) +template + requires (!std::same_as) struct prefix; ``` diff --git a/src/include/units/prefix.h b/src/include/units/prefix.h index 528f20ab..27dc1065 100644 --- a/src/include/units/prefix.h +++ b/src/include/units/prefix.h @@ -45,9 +45,9 @@ struct no_prefix : prefix_family {}; namespace detail { -template -struct prefix_base : downcast_base> { - using prefix_family = PT; +template +struct prefix_base : downcast_base> { + using prefix_family = PF; using ratio = R; }; @@ -64,13 +64,13 @@ struct prefix_base : downcast_base> { * prepended to the symbol of the unit * * @tparam Child inherited class type used by the downcasting facility (CRTP Idiom) - * @tparam PT a type of prefix family + * @tparam PF a type of prefix family * @tparam Symbol a text representation of the prefix * @tparam R factor to be used to scale a unit */ -template - requires (!std::same_as) -struct prefix : downcast_child> { +template + requires (!std::same_as) +struct prefix : downcast_child> { static constexpr auto symbol = Symbol; }; diff --git a/src/include/units/unit.h b/src/include/units/unit.h index 02930483..1c32ae24 100644 --- a/src/include/units/unit.h +++ b/src/include/units/unit.h @@ -88,39 +88,39 @@ struct unknown_coherent_unit : unit {}; * * Defines a named (in most cases coherent) unit that is then passed to a dimension definition. * A named unit may be used by other units defined with the prefix of the same type, unless - * no_prefix is provided for PT template parameter (in such a case it is impossible to define + * no_prefix is provided for PF template parameter (in such a case it is impossible to define * a prefix unit based on this one). * * @tparam Child inherited class type used by the downcasting facility (CRTP Idiom) * @tparam Symbol a short text representation of the unit - * @tparam PT no_prefix or a type of prefix family + * @tparam PF no_prefix or a type of prefix family */ -template +template struct named_unit : downcast_child, Child>> { static constexpr bool is_named = true; static constexpr auto symbol = Symbol; - using prefix_family = PT; + using prefix_family = PF; }; /** * @brief A scaled unit * * Defines a new named unit that is a scaled version of another unit. Such unit can be used by - * other units defined with the prefix of the same type, unless no_prefix is provided for PT + * other units defined with the prefix of the same type, unless no_prefix is provided for PF * template parameter (in such a case it is impossible to define a prefix unit based on this * one). * * @tparam Child inherited class type used by the downcasting facility (CRTP Idiom) * @tparam Symbol a short text representation of the unit - * @tparam PT no_prefix or a type of prefix family + * @tparam PF no_prefix or a type of prefix family * @tparam R a scale to apply to U * @tparam U a reference unit to scale */ -template +template struct named_scaled_unit : downcast_child, typename U::reference>> { static constexpr bool is_named = true; static constexpr auto symbol = Symbol; - using prefix_family = PT; + using prefix_family = PF; }; /** @@ -165,11 +165,11 @@ struct deduced_unit : downcast_child +// template // struct named_deduced_derived_unit : downcast_child> { // static constexpr bool is_named = true; // static constexpr auto symbol = Symbol; -// using prefix_family = PT; +// using prefix_family = PF; // }; /** @@ -178,18 +178,18 @@ struct deduced_unit : downcast_child +template struct alias_unit : U { static constexpr bool is_named = true; static constexpr auto symbol = Symbol; - using prefix_family = PT; + using prefix_family = PF; }; /**