#pragma once #include "./unit_reduction.h" namespace kelun { template struct unit_base {}; template class unit; template class unit...> { public: using value_type = StorageT; unit() = default; unit(const unit...>&) = default; unit(unit...>&&) = default; unit...>& operator=(const unit...>&) = default; unit...>& operator=(unit...>&&) = default; unit(const value_type&); unit(value_type&&); unit...>& operator=(const value_type&); unit...>& operator=(value_type&&); unit...> operator+(const unit...>& rhs); unit...> operator-(const unit...>& rhs); template typename unit_multiplication...>, unit>::type operator*(const unit& rhs); template typename unit_multiplication...>, typename unit_invert::type>::type operator/(const unit& rhs); value_type data() const; private: value_type value; }; template using scalar = unit; } #include "unit.tmpl.h"