xo-unit: + constexpr implementation (runtime+compiletime)
This commit is contained in:
parent
3643f6a0a0
commit
5bde1bfb94
12 changed files with 820 additions and 0 deletions
28
include/xo/unit/quantity2.hpp
Normal file
28
include/xo/unit/quantity2.hpp
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
/** @file quantity2.hpp
|
||||
*
|
||||
* Author: Roland Conybeare
|
||||
**/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "bpu_array.hpp"
|
||||
|
||||
namespace xo {
|
||||
namespace unit {
|
||||
/** @class quantity
|
||||
* @brief represent a scalar quantity with attached units. enforce dimensional consistency.
|
||||
*
|
||||
* Constexpr implementation, can compute units at compile time
|
||||
**/
|
||||
template <typename Repr = double, typename Int = std::int64_t>
|
||||
class quantity2 {
|
||||
public:
|
||||
using repr_type = Repr;
|
||||
|
||||
private:
|
||||
};
|
||||
} /*namespace unit*/
|
||||
} /*namespace xo*/
|
||||
|
||||
|
||||
/** end quantity2.hpp **/
|
||||
Loading…
Add table
Add a link
Reference in a new issue