xo-unit: + Quantity.abbrev()

This commit is contained in:
Roland Conybeare 2024-04-28 16:00:25 -04:00
commit 7fe2f523d7

View file

@ -214,12 +214,14 @@ namespace xo {
return *this;
}
constexpr nu_abbrev_type abbrev() const { return unit_.abbrev(); }
private:
/** @brief quantity represents this multiple of a unit amount **/
Repr scale_ = Repr{};
/** @brief unit for this quantity **/
natural_unit<Int> unit_;
}; /*Quantity2*/
}; /*Quantity*/
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
**/