xo-unit: utest: + bpu test to verify bpu is structurual type
This commit is contained in:
parent
67802ed5a3
commit
9350f017b1
4 changed files with 40 additions and 1 deletions
|
|
@ -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 **/
|
||||
|
|
|
|||
|
|
@ -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_;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue