summaryrefslogtreecommitdiff
path: root/src/unit_cast.h
diff options
context:
space:
mode:
authorClaudius Holeksa <mail@keldu.de>2023-05-23 18:32:59 +0200
committerClaudius Holeksa <mail@keldu.de>2023-05-23 18:32:59 +0200
commitcf18707c086a1b47600c924ae1f33a379d1d3fb2 (patch)
treec1beaf4fb536c5fce7831f0ea44dedbc6f8d5cc7 /src/unit_cast.h
parent49cd4c7f007df26733f8c609c234a37be8214163 (diff)
nix: Fixed dev install and moved folders
Diffstat (limited to 'src/unit_cast.h')
-rw-r--r--src/unit_cast.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/unit_cast.h b/src/unit_cast.h
new file mode 100644
index 0000000..8dc2689
--- /dev/null
+++ b/src/unit_cast.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <forstio/core/common.h>
+
+namespace kel {
+template<typename S, typename From, typename To>
+class unit_convert {
+ static_assert(always_false<S, From, To>, "Units can't be converted to each other");
+};
+
+template<typename Store, typename Same>
+class unit_convert<Store, Same, Same> {
+ static constexpr factor = static_cast<Store>(1);
+};
+}