xo-unit: refactor: ++ docs

This commit is contained in:
Roland Conybeare 2024-05-07 23:12:04 -04:00
commit 5fd6bd3148
11 changed files with 225 additions and 151 deletions

View file

@ -31,6 +31,17 @@ namespace xo {
// ----- units for dim::mass -----
/** @brief return abbreviated suffix to use for a mass unit
* of (relative) size @p scalefactor.
*
* Example:
* @code
* using namespace xo::qty;
*
* static_assert(abbrev::mass_unit2_abbrev(scalefactor_ratio_type(1,1000))
* == xo::flatstring("mg"));
* @endcode
**/
static
constexpr basis_unit2_abbrev_type
mass_unit2_abbrev(const scalefactor_ratio_type & scalefactor)