forked from mpusz/mp-units
@@ -161,31 +161,6 @@ struct derived_unit : downcast_dispatch<Child, detail::derived_unit<Dim, U, URes
|
||||
using prefix_family = no_prefix;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief A unit with a deduced ratio and symbol that can be used as a named unit for children
|
||||
*
|
||||
* Defines a new unit with a deduced ratio and symbol based on the recipe from the provided
|
||||
* derived dimension. The number and order of provided units should match the recipe of the
|
||||
* derived dimension. All of the units provided should also be named ones so it is possible
|
||||
* to create a deduced symbol text.
|
||||
*
|
||||
* @tparam Child inherited class type used by the downcasting facility (CRTP Idiom)
|
||||
* @tparam Dim a derived dimension recipe to use for deduction
|
||||
* @tparam U the unit of the first composite dimension from provided derived dimension's recipe
|
||||
* @tparam URest the units for the rest of dimensions from the recipe
|
||||
*/
|
||||
template<typename Child, DerivedDimension Dim, Unit U, Unit... URest>
|
||||
requires detail::same_scaled_units<typename Dim::recipe, U, URest...> &&
|
||||
(U::is_named && (URest::is_named && ... && true))
|
||||
// TODO - 'noble' is placeholder to sort of mean can pass its name on to other deduced units
|
||||
struct noble_derived_unit : downcast_dispatch<Child, detail::derived_unit<Dim, U, URest...>> {
|
||||
static constexpr bool is_named = true;
|
||||
static constexpr auto symbol = detail::derived_symbol_text<Dim, U, URest...>();
|
||||
using prefix_family = no_prefix;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief A named unit with a deduced ratio
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user