From 613cfebc0b2a2968260e5f9122d7b5e7ba3755c3 Mon Sep 17 00:00:00 2001 From: Claudius Holeksa Date: Tue, 23 May 2023 16:38:43 +0200 Subject: c++: Renamed class and fixed namespace naming --- src/kelunit/unit.tmpl.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/kelunit/unit.tmpl.h') diff --git a/src/kelunit/unit.tmpl.h b/src/kelunit/unit.tmpl.h index 42b96ef..d89e0c1 100644 --- a/src/kelunit/unit.tmpl.h +++ b/src/kelunit/unit.tmpl.h @@ -3,51 +3,51 @@ namespace kelun { template -unit...>::unit(const value_type& value_): +unit...>::unit(const value_type& value_): value{value_}{} template -unit...>::unit(value_type&& value_):value{std::move(value_)}{} +unit...>::unit(value_type&& value_):value{std::move(value_)}{} template -unit...>& unit...>::operator=(const typename unit...>::value_type& value_){ +unit...>& unit...>::operator=(const typename unit...>::value_type& value_){ value = value_; return *this; } template -unit...>& unit...>::operator=(typename unit...>::value_type&& value_){ +unit...>& unit...>::operator=(typename unit...>::value_type&& value_){ value = std::move(value_); return *this; } template -unit...> unit...>::operator+(const unit...>& rhs){ +unit...> unit...>::operator+(const unit...>& rhs){ return value + rhs.value; } template -unit...> unit...>::operator-(const unit...>& rhs){ +unit...> unit...>::operator-(const unit...>& rhs){ return value - rhs.value; } template template -typename unit_multiplication...>, unit>::type -unit...>::operator*(const unit& rhs){ +typename unit_multiplication...>, unit>::type +unit...>::operator*(const unit& rhs){ return value * rhs.data(); } template template -typename unit_multiplication...>, typename unit_invert::type>::type -unit...>::operator/(const unit& rhs){ +typename unit_multiplication...>, typename unit_invert::type>::type +unit...>::operator/(const unit& rhs){ typename unit_invert::type rhs_inverted{static_cast(1)/rhs.data()}; return value * rhs_inverted.data(); } template -typename unit...>::value_type unit...>::data() const { +typename unit...>::value_type unit...>::data() const { return value; } } -- cgit v1.2.3