xo-unit: + always_constexpr_unit flag in quantity,xquantity
This commit is contained in:
parent
1729ce06fc
commit
be24d649eb
2 changed files with 7 additions and 3 deletions
|
|
@ -34,6 +34,8 @@ namespace xo {
|
|||
constexpr quantity() : scale_{0} {}
|
||||
explicit constexpr quantity(Repr scale) : scale_{scale} {}
|
||||
|
||||
static constexpr bool always_constexpr_unit = true;
|
||||
|
||||
constexpr const repr_type & scale() const { return scale_; }
|
||||
constexpr const unit_type & unit() const { return s_unit; }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue