mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-01 03:14:29 +02:00
upcastable renamed to upcast_base
This commit is contained in:
@@ -43,7 +43,7 @@ or more base dimensions:
|
||||
|
||||
```cpp
|
||||
template<Exponent... Es>
|
||||
struct dimension : upcastable<dimension<Es...>> {};
|
||||
struct dimension : upcast_base<dimension<Es...>> {};
|
||||
```
|
||||
|
||||
`units::Dimension` is a Concept that is satisfied by a type that is empty and publicly
|
||||
@@ -185,7 +185,7 @@ struct merge_dimension {
|
||||
```cpp
|
||||
template<Dimension D, Ratio R>
|
||||
requires (R::num > 0)
|
||||
struct unit : upcastable<unit<D, R>> {
|
||||
struct unit : upcast_base<unit<D, R>> {
|
||||
using dimension = D;
|
||||
using ratio = R;
|
||||
};
|
||||
@@ -344,7 +344,7 @@ and
|
||||
are not arguably much easier to understand thus provide better user experience.
|
||||
|
||||
Upcasting capability is provided through dedicated `upcasting_traits` and by `base_type` member
|
||||
type in `upcastable` class template.
|
||||
type in `upcast_base` class template.
|
||||
|
||||
```cpp
|
||||
template<typename T>
|
||||
|
@@ -108,10 +108,10 @@ namespace units {
|
||||
template<Ratio Ratio1, Ratio Ratio2>
|
||||
using common_ratio_t = typename common_ratio<Ratio1, Ratio2>::type;
|
||||
|
||||
// upcastable
|
||||
// upcast_base
|
||||
|
||||
template<typename BaseType>
|
||||
struct upcastable {
|
||||
struct upcast_base {
|
||||
using base_type = BaseType;
|
||||
};
|
||||
|
||||
|
@@ -87,7 +87,7 @@ namespace units {
|
||||
// dimension
|
||||
|
||||
template<Exponent... Es>
|
||||
struct dimension : upcastable<dimension<Es...>> {};
|
||||
struct dimension : upcast_base<dimension<Es...>> {};
|
||||
|
||||
// is_dimension
|
||||
namespace detail {
|
||||
|
@@ -29,7 +29,7 @@ namespace units {
|
||||
|
||||
template<Dimension D, Ratio R>
|
||||
requires (R::num > 0)
|
||||
struct unit : upcastable<unit<D, R>> {
|
||||
struct unit : upcast_base<unit<D, R>> {
|
||||
using dimension = D;
|
||||
using ratio = R;
|
||||
};
|
||||
|
Reference in New Issue
Block a user