xo-unit: test: verify natural_unit/scaled_unit is structural type
This commit is contained in:
parent
9350f017b1
commit
a7af978e50
6 changed files with 84 additions and 5 deletions
|
|
@ -122,7 +122,7 @@ namespace xo {
|
|||
return retval;
|
||||
}
|
||||
|
||||
private:
|
||||
public: /* need public members so that a natural_unit instance can be a non-type template parameter (a structural type) */
|
||||
/** @brief the number of occupied slots in @c bpu_v_ **/
|
||||
std::size_t n_bpu_;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ namespace xo {
|
|||
{}
|
||||
|
||||
constexpr scaled_unit reciprocal() const {
|
||||
return scaled_unit(nu_reciprocal(natural_unit_,
|
||||
1 / outer_scale_factor_,
|
||||
1.0 / outer_scale_sq_));
|
||||
return scaled_unit(natural_unit_.reciprocal(),
|
||||
1 / outer_scale_factor_,
|
||||
1.0 / outer_scale_sq_);
|
||||
}
|
||||
|
||||
natural_unit<Int> natural_unit_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue