refactor: detail::same_scaled_units renamed to detail::compatible_units

This commit is contained in:
Mateusz Pusz
2022-05-23 20:47:29 +02:00
parent 768f400cc3
commit ef7e7c4cfc
2 changed files with 4 additions and 4 deletions

View File

@@ -26,12 +26,12 @@
namespace units::detail {
// same_scaled_units
// compatible_units
template<typename ExpList, Unit... Us>
inline constexpr bool same_scaled_units = false;
inline constexpr bool compatible_units = false;
template<typename... Es, Unit... Us>
inline constexpr bool same_scaled_units<exponent_list<Es...>, Us...> = (UnitOf<Us, typename Es::dimension> && ...);
inline constexpr bool compatible_units<exponent_list<Es...>, Us...> = (UnitOf<Us, typename Es::dimension> && ...);
// derived_scaled_unit

View File

@@ -145,7 +145,7 @@ struct derived_unit : downcast_dispatch<Child, scaled_unit<ratio(1), Child>> {};
* @tparam URest the units for the rest of dimensions from the recipe
*/
template<typename Child, DerivedDimension Dim, NamedUnit U, NamedUnit... URest>
requires detail::same_scaled_units<typename Dim::recipe, U, URest...>
requires detail::compatible_units<typename Dim::recipe, U, URest...>
struct derived_scaled_unit : downcast_dispatch<Child, detail::derived_scaled_unit<Dim, U, URest...>> {
static constexpr auto symbol = detail::derived_symbol_text<Dim, U, URest...>();
};