xo-unit: + Quantity/Dimensionless
This commit is contained in:
parent
b32363b848
commit
0f1338921d
1 changed files with 10 additions and 0 deletions
|
|
@ -242,6 +242,16 @@ namespace xo {
|
|||
return Quantity::divide(x, y);
|
||||
}
|
||||
|
||||
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
**/
|
||||
template <typename Quantity, typename Dimensionless>
|
||||
requires quantity2_concept<Quantity> && std::is_arithmetic_v<Dimensionless>
|
||||
constexpr auto
|
||||
operator/ (const Quantity & x, Dimensionless y)
|
||||
{
|
||||
return x.divide_by(y);
|
||||
}
|
||||
|
||||
/** note: won't have constexpr result until c++26 (when ::sqrt(), ::pow() are constexpr)
|
||||
**/
|
||||
template <typename Quantity, typename Quantity2>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue