xo-unit: + repr argument to stdquantity
This commit is contained in:
parent
4263144614
commit
83424e1ee3
3 changed files with 6 additions and 5 deletions
|
|
@ -8,14 +8,13 @@ int
|
|||
main () {
|
||||
namespace q = xo::qty::qty;
|
||||
namespace u = xo::qty::nu;
|
||||
using xo::qty::with_units;
|
||||
using xo::qty::stdquantity;
|
||||
using xo::qty::quantity;
|
||||
using xo::flatstring;
|
||||
using namespace std;
|
||||
|
||||
constexpr stdquantity<u::second> t = q::minutes(2);
|
||||
constexpr stdquantity<u::meter> d = q::kilometers(2.5);
|
||||
constexpr stdquantity<double, u::second> t = q::minutes(2);
|
||||
constexpr stdquantity<double, u::meter> d = q::kilometers(2.5);
|
||||
|
||||
constexpr auto t2 = t*t;
|
||||
constexpr auto a = d / (t*t);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue