Prefixes support added
This commit is contained in:
1 parent
d572b50bee
commit
f995f5ce60
5 files changed
+45
-24
No files matched your search
@@ -37,16 +37,16 @@ namespace units {
|
||||
using length = quantity<dimension_length, U, Rep>;
|
||||
|
||||
// SI units
|
||||
struct millimeter : unit<dimension_length, std::milli> {};
|
||||
template<> struct upcasting_traits<upcast_from<millimeter>> : upcast_to<millimeter> {};
|
||||
|
||||
struct centimeter : unit<dimension_length, std::ratio<1, 100>> {};
|
||||
template<> struct upcasting_traits<upcast_from<centimeter>> : upcast_to<centimeter> {};
|
||||
|
||||
struct meter : unit<dimension_length, std::ratio<1>> {};
|
||||
template<> struct upcasting_traits<upcast_from<meter>> : upcast_to<meter> {};
|
||||
|
||||
struct kilometer : unit<dimension_length, std::kilo> {};
|
||||
struct millimeter : milli<meter> {};
|
||||
template<> struct upcasting_traits<upcast_from<millimeter>> : upcast_to<millimeter> {};
|
||||
|
||||
struct centimeter : centi<meter> {};
|
||||
template<> struct upcasting_traits<upcast_from<centimeter>> : upcast_to<centimeter> {};
|
||||
|
||||
struct kilometer : kilo<meter> {};
|
||||
template<> struct upcasting_traits<upcast_from<kilometer>> : upcast_to<kilometer> {};
|
||||
|
||||
inline namespace literals {
|
||||
|
||||
Reference in new issue
Block a user