xo-unit: + Quantity.abbrev()
This commit is contained in:
parent
50789fae7c
commit
7fe2f523d7
1 changed files with 3 additions and 1 deletions
|
|
@ -214,12 +214,14 @@ namespace xo {
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
constexpr nu_abbrev_type abbrev() const { return unit_.abbrev(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/** @brief quantity represents this multiple of a unit amount **/
|
/** @brief quantity represents this multiple of a unit amount **/
|
||||||
Repr scale_ = Repr{};
|
Repr scale_ = Repr{};
|
||||||
/** @brief unit for this quantity **/
|
/** @brief unit for this quantity **/
|
||||||
natural_unit<Int> unit_;
|
natural_unit<Int> unit_;
|
||||||
}; /*Quantity2*/
|
}; /*Quantity*/
|
||||||
|
|
||||||
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
|
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||||
**/
|
**/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue