diff options
author | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-07-29 14:18:30 +0200 |
---|---|---|
committer | Claudius 'keldu' Holeksa <mail@keldu.de> | 2024-07-29 14:18:30 +0200 |
commit | 700cde2d499742160deb361f42b7e861ae1db8ed (patch) | |
tree | ba796243a94578f9c2105080fa19040a341c4482 /c++/unit_cast.hpp | |
parent | fb7dd1c9185da30aed8645c084be0722e061a867 (diff) |
Renaming to new standard
Diffstat (limited to 'c++/unit_cast.hpp')
-rw-r--r-- | c++/unit_cast.hpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/c++/unit_cast.hpp b/c++/unit_cast.hpp new file mode 100644 index 0000000..8dc2689 --- /dev/null +++ b/c++/unit_cast.hpp @@ -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); +}; +} |