xo-unit: + constexpr implementation (runtime+compiletime)
This commit is contained in:
parent
3643f6a0a0
commit
5bde1bfb94
12 changed files with 820 additions and 0 deletions
24
include/xo/unit/unit2.hpp
Normal file
24
include/xo/unit/unit2.hpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/** @file unit2.hpp
|
||||
*
|
||||
* Author: Roland Conybeare
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "natural_unit.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace unit {
|
||||
/** @class unit2
|
||||
* @brief represent an arbitrary unit along with dimension details
|
||||
*
|
||||
* For example,
|
||||
* kg.m.s^-2 or
|
||||
* (kilogram * meter) / (second * second)
|
||||
**/
|
||||
template <typename Int>
|
||||
using unit2 = natural_unit<Int>;
|
||||
} /*namespace unit*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/** end unit2.hpp **/
|
||||
Loading…
Add table
Add a link
Reference in a new issue