feat!: 💥 dimensionless quantities refactored
Dimensionless quantities are now represented by quantity types rather than by plain representation types. Only dimensionless quantities with `unitless` unit are implicitly convertible from representation types. `units::exp()` now is a function doing std::exp() on a representation type (previous `units::exp` class template was renamed to `units::exponent`). BREAKING_CHANGE: gcc-9.3 support removed BREAKING_CHANGE: `exp` and `Exp` renamed to `exponent` and `Exponent` Resolves #27 Resolves #42
This commit is contained in:
1 parent
c8b60b80c1
commit
563b358d5e
47 files changed
+599
-422
No files matched your search
@@ -128,23 +128,23 @@ concept BaseDimension = detail::is_derived_from_base_dimension<T>;
|
||||
namespace detail {
|
||||
|
||||
template<typename T>
|
||||
inline constexpr bool is_exp = false;
|
||||
inline constexpr bool is_exponent = false;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
/**
|
||||
* @brief A concept matching dimension's exponents.
|
||||
*
|
||||
* Satisfied by all specializations of :class:`exp`.
|
||||
* Satisfied by all specializations of :class:`exponent`.
|
||||
*/
|
||||
template<typename T>
|
||||
concept Exponent = detail::is_exp<T>;
|
||||
concept Exponent = detail::is_exponent<T>;
|
||||
|
||||
// DerivedDimension
|
||||
namespace detail {
|
||||
|
||||
template<Exponent E, Exponent... ERest>
|
||||
requires (BaseDimension<typename E::dimension> && ... && BaseDimension<typename ERest::dimension>)
|
||||
template<Exponent... Es>
|
||||
requires (BaseDimension<typename Es::dimension> && ...)
|
||||
struct derived_dimension_base;
|
||||
|
||||
} // namespace detail
|
||||
|
||||
Reference in new issue
Block a user