forked from mpusz/mp-units
refactor: QuantityValue concept renamed to Representation
This commit is contained in:
@@ -337,7 +337,7 @@ concept QuantityLike = detail::is_quantity_like<T>;
|
||||
template<typename T>
|
||||
concept QuantityPointLike = detail::is_quantity_point_like<T>;
|
||||
|
||||
// QuantityValue
|
||||
// Representation
|
||||
|
||||
template<typename T, typename U>
|
||||
concept common_type_with_ = // exposition only
|
||||
@@ -397,7 +397,7 @@ concept wrapped_quantity_ = // exposition only
|
||||
* Satisfied by types that satisfy `(!Quantity<T>) && (!WrappedQuantity<T>) && std::regular<T>`.
|
||||
*/
|
||||
template<typename T>
|
||||
concept QuantityValue =
|
||||
concept Representation =
|
||||
(!Quantity<T>) &&
|
||||
(!QuantityLike<T>) &&
|
||||
(!wrapped_quantity_<T>) &&
|
||||
@@ -413,7 +413,7 @@ template<typename T>
|
||||
typename quantity_like_traits<T>::rep;
|
||||
requires Dimension<typename quantity_like_traits<T>::dimension>;
|
||||
requires Unit<typename quantity_like_traits<T>::unit>;
|
||||
requires QuantityValue<typename quantity_like_traits<T>::rep>;
|
||||
requires Representation<typename quantity_like_traits<T>::rep>;
|
||||
{ quantity_like_traits<T>::number(q) } -> std::convertible_to<typename quantity_like_traits<T>::rep>;
|
||||
}
|
||||
inline constexpr bool is_quantity_like<T> = true;
|
||||
@@ -425,7 +425,7 @@ template<typename T>
|
||||
typename quantity_point_like_traits<T>::rep;
|
||||
requires Dimension<typename quantity_point_like_traits<T>::dimension>;
|
||||
requires Unit<typename quantity_point_like_traits<T>::unit>;
|
||||
requires QuantityValue<typename quantity_point_like_traits<T>::rep>;
|
||||
requires Representation<typename quantity_point_like_traits<T>::rep>;
|
||||
{ quantity_point_like_traits<T>::relative(q) } -> QuantityLike;
|
||||
}
|
||||
inline constexpr bool is_quantity_point_like<T> = true;
|
||||
|
||||
@@ -28,16 +28,16 @@
|
||||
|
||||
namespace units {
|
||||
|
||||
template<Dimension D, UnitOf<D> U, QuantityValue Rep>
|
||||
template<Dimension D, UnitOf<D> U, Representation Rep>
|
||||
class quantity;
|
||||
|
||||
template<Dimension D, UnitOf<D> U, QuantityValue Rep>
|
||||
template<Dimension D, UnitOf<D> U, Representation Rep>
|
||||
class quantity_point;
|
||||
|
||||
template<Kind K, UnitOf<typename K::dimension> U, QuantityValue Rep>
|
||||
template<Kind K, UnitOf<typename K::dimension> U, Representation Rep>
|
||||
class quantity_kind;
|
||||
|
||||
template<PointKind PK, UnitOf<typename PK::dimension> U, QuantityValue Rep>
|
||||
template<PointKind PK, UnitOf<typename PK::dimension> U, Representation Rep>
|
||||
class quantity_point_kind;
|
||||
|
||||
namespace detail {
|
||||
@@ -73,7 +73,7 @@ struct common_quantity_impl<quantity<D1, U1, Rep1>, quantity<D2, U2, Rep2>, Rep>
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template<Quantity Q1, QuantityEquivalentTo<Q1> Q2, QuantityValue Rep = std::common_type_t<typename Q1::rep, typename Q2::rep>>
|
||||
template<Quantity Q1, QuantityEquivalentTo<Q1> Q2, Representation Rep = std::common_type_t<typename Q1::rep, typename Q2::rep>>
|
||||
using common_quantity = TYPENAME detail::common_quantity_impl<Q1, Q2, Rep>::type;
|
||||
|
||||
template<QuantityPoint QP1, QuantityPointEquivalentTo<QP1> QP2>
|
||||
|
||||
Reference in New Issue
Block a user