xo-unit: + always_constexpr_unit flag in quantity,xquantity

This commit is contained in:
Roland Conybeare 2024-05-03 01:36:05 -04:00
commit be24d649eb
2 changed files with 7 additions and 3 deletions

View file

@ -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; }