xo-unit: + constexpr implementation (runtime+compiletime)

This commit is contained in:
Roland Conybeare 2024-04-22 14:53:57 -04:00
commit 5bde1bfb94
12 changed files with 820 additions and 0 deletions

24
include/xo/unit/unit2.hpp Normal file
View 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 **/