mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-06 21:54:28 +02:00
fix: TYPENAME
added to dimension.h
This commit is contained in:
@@ -174,13 +174,13 @@ struct derived_dimension_impl : detail::expr_fractions<derived_dimension<>, Ds..
|
|||||||
* For example:
|
* For example:
|
||||||
*
|
*
|
||||||
* @code{.cpp}
|
* @code{.cpp}
|
||||||
* DERIVED_DIMENSION(frequency, 1 / time);
|
* inline constexpr struct frequency : decltype(1 / time) {} frequency;
|
||||||
* DERIVED_DIMENSION(speed, length / time);
|
* inline constexpr struct speed : decltype(length / time) {} speed;
|
||||||
* DERIVED_DIMENSION(acceleration, speed / time);
|
* inline constexpr struct acceleration : decltype(speed / time) {} acceleration;
|
||||||
* DERIVED_DIMENSION(force, mass * acceleration);
|
* inline constexpr struct force : decltype(mass * acceleration) {} force;
|
||||||
* DERIVED_DIMENSION(energy, force * length);
|
* inline constexpr struct energy : decltype(force * length) {} energy;
|
||||||
* DERIVED_DIMENSION(moment_of_force, length * force);
|
* inline constexpr struct moment_of_force : decltype(length * force) {} moment_of_force;
|
||||||
* DERIVED_DIMENSION(torque, moment_of_force);
|
* inline constexpr struct torque : decltype(moment_of_force) {} torque;
|
||||||
* @endcode
|
* @endcode
|
||||||
*
|
*
|
||||||
* - `frequency` will be derived from type `derived_dimension<dimension_one, per<time>>`
|
* - `frequency` will be derived from type `derived_dimension<dimension_one, per<time>>`
|
||||||
@@ -283,11 +283,11 @@ struct dim_type_impl {
|
|||||||
|
|
||||||
template<DerivedDimension T>
|
template<DerivedDimension T>
|
||||||
struct dim_type_impl<T> {
|
struct dim_type_impl<T> {
|
||||||
using type = T::_type_;
|
using type = TYPENAME T::_type_;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<Dimension T>
|
template<Dimension T>
|
||||||
using dim_type = dim_type_impl<T>::type;
|
using dim_type = TYPENAME dim_type_impl<T>::type;
|
||||||
|
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user