summaryrefslogtreecommitdiff
path: root/src/unit.h
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2023-08-25 10:10:51 +0200
committerClaudius "keldu" Holeksa <mail@keldu.de>2023-08-25 10:10:51 +0200
commit488653602d0636a1fa5ef6e64cabb9b903dce42a (patch)
treeb5d4bbffdf21017777f4c4d994b7b41a02e8fa5d /src/unit.h
parente3c73b2c8b33b43d53de6d2106b93a4343609e80 (diff)
Renamed src folder to c++
Diffstat (limited to 'src/unit.h')
-rw-r--r--src/unit.h49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/unit.h b/src/unit.h
deleted file mode 100644
index a8e8320..0000000
--- a/src/unit.h
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once
-
-#include "unit_reduction.h"
-
-namespace kel {
-template<typename UnitType, int64_t Exponent>
-struct unit_component {};
-
-template<typename StorageT, typename... T>
-class unit;
-
-template<typename StorageT, typename... UnitTypes, int64_t... Exponents>
-class unit<StorageT, unit_component<UnitTypes, Exponents>...> {
-public:
- using value_type = StorageT;
-
- unit() = default;
-
- unit(const unit<StorageT,unit_component<UnitTypes, Exponents>...>&) = default;
- unit(unit<StorageT,unit_component<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_component<UnitTypes,Exponents>...>& operator=(const value_type&);
- unit<StorageT,unit_component<UnitTypes,Exponents>...>& operator=(value_type&&);
-
- 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_component<UnitTypes,Exponents>...>, unit<StorageT,Trhs...>>::type operator*(const unit<StorageT, Trhs...>& rhs);
-
- template<typename... Trhs>
- 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:
- value_type value;
-};
-
-template<typename S>
-using scalar = unit<S>;
-}
-
-#include "unit.tmpl.h"