downcasting_traits renamed to downcast_traits
- downcasting_traits -> downcast_traits - downcasting_traits_t -> downcast_traits_t - downcast_from -> downcast_base_t - downcast_to removed
This commit is contained in:
1 parent
da11f41529
commit
0cffcf7849
32 files changed
+118
-129
No files matched your search
@@ -87,7 +87,7 @@ namespace units {
|
||||
template<typename T>
|
||||
concept bool Dimension =
|
||||
std::is_empty_v<T> &&
|
||||
detail::is_dimension<downcast_from<T>>;
|
||||
detail::is_dimension<downcast_base_t<T>>;
|
||||
|
||||
// exp
|
||||
|
||||
@@ -156,10 +156,10 @@ namespace units {
|
||||
struct dim_invert;
|
||||
|
||||
template<typename... Es>
|
||||
struct dim_invert<dimension<Es...>> : std::type_identity<downcasting_traits_t<dimension<exp_invert_t<Es>...>>> {};
|
||||
struct dim_invert<dimension<Es...>> : std::type_identity<downcast_traits_t<dimension<exp_invert_t<Es>...>>> {};
|
||||
|
||||
template<Dimension D>
|
||||
using dim_invert_t = dim_invert<downcast_from<D>>::type;
|
||||
using dim_invert_t = dim_invert<downcast_base_t<D>>::type;
|
||||
|
||||
|
||||
// todo: force as the only user interface to create dimensions through modules
|
||||
@@ -221,7 +221,7 @@ namespace units {
|
||||
|
||||
template<Dimension Dim, int Num, int Den, Exponent... ERest>
|
||||
struct extract<exp<Dim, Num, Den>, ERest...> {
|
||||
using type = extract_t<exp<downcast_from<Dim>, Num, Den>, ERest...>;
|
||||
using type = extract_t<exp<downcast_base_t<Dim>, Num, Den>, ERest...>;
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
@@ -248,7 +248,7 @@ namespace units {
|
||||
struct dimension_multiply;
|
||||
|
||||
template<typename... E1, typename... E2>
|
||||
struct dimension_multiply<dimension<E1...>, dimension<E2...>> : std::type_identity<downcasting_traits_t<merge_dimension_t<dimension<E1...>, dimension<E2...>>>> {};
|
||||
struct dimension_multiply<dimension<E1...>, dimension<E2...>> : std::type_identity<downcast_traits_t<merge_dimension_t<dimension<E1...>, dimension<E2...>>>> {};
|
||||
|
||||
template<Dimension D1, Dimension D2>
|
||||
using dimension_multiply_t = dimension_multiply<typename D1::base_type, typename D2::base_type>::type;
|
||||
@@ -271,7 +271,7 @@ namespace units {
|
||||
struct dimension_sqrt;
|
||||
|
||||
template<typename... Es>
|
||||
struct dimension_sqrt<dimension<Es...>> : std::type_identity<downcasting_traits_t<dimension<exp_multiply_t<Es, 1, 2>...>>> {};
|
||||
struct dimension_sqrt<dimension<Es...>> : std::type_identity<downcast_traits_t<dimension<exp_multiply_t<Es, 1, 2>...>>> {};
|
||||
|
||||
template<Dimension D>
|
||||
using dimension_sqrt_t = dimension_sqrt<typename D::base_type>::type;
|
||||
@@ -281,7 +281,7 @@ namespace units {
|
||||
struct dimension_pow;
|
||||
|
||||
template<typename... Es, std::size_t N>
|
||||
struct dimension_pow<dimension<Es...>, N> : std::type_identity<downcasting_traits_t<dimension<exp_multiply_t<Es, N, 1>...>>> {};
|
||||
struct dimension_pow<dimension<Es...>, N> : std::type_identity<downcast_traits_t<dimension<exp_multiply_t<Es, N, 1>...>>> {};
|
||||
|
||||
template<Dimension D, std::size_t N>
|
||||
using dimension_pow_t = dimension_pow<typename D::base_type, N>::type;
|
||||
|
||||
Reference in new issue
Block a user