xo-unit: utest: + bpu test to verify bpu is structurual type

This commit is contained in:
Roland Conybeare 2024-04-28 15:09:01 -04:00
commit 9350f017b1
4 changed files with 40 additions and 1 deletions

View file

@ -31,6 +31,7 @@ namespace xo {
constexpr basis_unit & operator=(const basis_unit & x) = default;
public: /* need public members so that a basis_unit instance can be a non-type template parameter (a structural type) */
/** @brief identifies a native unit, e.g. time (in seconds) **/
dim native_dim_ = dim::invalid;
/** @brief this unit defined as multiple scalefactor times native unit **/

View file

@ -109,7 +109,8 @@ namespace xo {
ratio::ratio<Int2>(power_.num(), power_.den()));
}
/** @brief this unit represents native dimension taken to this power **/
public: /* need public members so that a basis_unit instance can be a non-type template parameter (a structural type) */
/** @brief this unit represents basis dimension (bu) taken to this power **/
power_ratio_type power_;
};