diff --git a/README.md b/README.md index d1ad53ce..e1b2fe60 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ or more base dimensions: ```cpp template -struct dimension : upcastable> {}; +struct dimension : upcast_base> {}; ``` `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 requires (R::num > 0) -struct unit : upcastable> { +struct unit : upcast_base> { 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 diff --git a/src/include/units/bits/tools.h b/src/include/units/bits/tools.h index 42c781c3..6955ebc1 100644 --- a/src/include/units/bits/tools.h +++ b/src/include/units/bits/tools.h @@ -108,10 +108,10 @@ namespace units { template using common_ratio_t = typename common_ratio::type; - // upcastable + // upcast_base template - struct upcastable { + struct upcast_base { using base_type = BaseType; }; diff --git a/src/include/units/dimension.h b/src/include/units/dimension.h index 827eb39f..152a25ad 100644 --- a/src/include/units/dimension.h +++ b/src/include/units/dimension.h @@ -87,7 +87,7 @@ namespace units { // dimension template - struct dimension : upcastable> {}; + struct dimension : upcast_base> {}; // is_dimension namespace detail { diff --git a/src/include/units/unit.h b/src/include/units/unit.h index 965ae609..148e922e 100644 --- a/src/include/units/unit.h +++ b/src/include/units/unit.h @@ -29,7 +29,7 @@ namespace units { template requires (R::num > 0) - struct unit : upcastable> { + struct unit : upcast_base> { using dimension = D; using ratio = R; };