summaryrefslogtreecommitdiff
path: root/c++/unit_cast.hpp
blob: b5e4a5454cfdc26236ceb57e6ebe87c18f153087 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#include <forstio/common.hpp>

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);
};
}