diff options
Diffstat (limited to 'src/kelunit/unit.h')
-rw-r--r-- | src/kelunit/unit.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/kelunit/unit.h b/src/kelunit/unit.h index 4958eb9..a8e8320 100644 --- a/src/kelunit/unit.h +++ b/src/kelunit/unit.h @@ -1,41 +1,41 @@ #pragma once -#include "./unit_reduction.h" +#include "unit_reduction.h" -namespace kelun { +namespace kel { template<typename UnitType, int64_t Exponent> -struct unit_base {}; +struct unit_component {}; template<typename StorageT, typename... T> class unit; template<typename StorageT, typename... UnitTypes, int64_t... Exponents> -class unit<StorageT, unit_base<UnitTypes, Exponents>...> { +class unit<StorageT, unit_component<UnitTypes, Exponents>...> { public: using value_type = StorageT; unit() = default; - unit(const unit<StorageT,unit_base<UnitTypes, Exponents>...>&) = default; - unit(unit<StorageT,unit_base<UnitTypes,Exponents>...>&&) = default; + unit(const unit<StorageT,unit_component<UnitTypes, Exponents>...>&) = default; + unit(unit<StorageT,unit_component<UnitTypes,Exponents>...>&&) = default; - unit<StorageT,unit_base<UnitTypes,Exponents>...>& operator=(const unit<StorageT,unit_base<UnitTypes,Exponents>...>&) = default; - unit<StorageT,unit_base<UnitTypes,Exponents>...>& operator=(unit<StorageT,unit_base<UnitTypes,Exponents>...>&&) = default; + unit<StorageT,unit_component<UnitTypes,Exponents>...>& operator=(const unit<StorageT,unit_component<UnitTypes,Exponents>...>&) = default; + unit<StorageT,unit_component<UnitTypes,Exponents>...>& operator=(unit<StorageT,unit_component<UnitTypes,Exponents>...>&&) = default; unit(const value_type&); unit(value_type&&); - unit<StorageT,unit_base<UnitTypes,Exponents>...>& operator=(const value_type&); - unit<StorageT,unit_base<UnitTypes,Exponents>...>& operator=(value_type&&); + unit<StorageT,unit_component<UnitTypes,Exponents>...>& operator=(const value_type&); + unit<StorageT,unit_component<UnitTypes,Exponents>...>& operator=(value_type&&); - unit<StorageT,unit_base<UnitTypes,Exponents>...> operator+(const unit<StorageT,unit_base<UnitTypes,Exponents>...>& rhs); - unit<StorageT,unit_base<UnitTypes,Exponents>...> operator-(const unit<StorageT,unit_base<UnitTypes,Exponents>...>& rhs); + unit<StorageT,unit_component<UnitTypes,Exponents>...> operator+(const unit<StorageT,unit_component<UnitTypes,Exponents>...>& rhs); + unit<StorageT,unit_component<UnitTypes,Exponents>...> operator-(const unit<StorageT,unit_component<UnitTypes,Exponents>...>& rhs); template<typename... Trhs> - typename unit_multiplication<unit<StorageT,unit_base<UnitTypes,Exponents>...>, unit<StorageT,Trhs...>>::type operator*(const unit<StorageT, Trhs...>& rhs); + typename unit_multiplication<unit<StorageT,unit_component<UnitTypes,Exponents>...>, unit<StorageT,Trhs...>>::type operator*(const unit<StorageT, Trhs...>& rhs); template<typename... Trhs> - typename unit_multiplication<unit<StorageT, unit_base<UnitTypes,Exponents>...>, typename unit_invert<StorageT,Trhs...>::type>::type operator/(const unit<StorageT, Trhs...>& rhs); + typename unit_multiplication<unit<StorageT, unit_component<UnitTypes,Exponents>...>, typename unit_invert<StorageT,Trhs...>::type>::type operator/(const unit<StorageT, Trhs...>& rhs); value_type data() const; private: |