diff options
-rw-r--r-- | src/kelunit/unit_cast.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/kelunit/unit_cast.h b/src/kelunit/unit_cast.h new file mode 100644 index 0000000..8dc2689 --- /dev/null +++ b/src/kelunit/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); +}; +} |