diff --git a/example/ex3/ex3.cpp b/example/ex3/ex3.cpp index 36073e1a..fd1faebb 100644 --- a/example/ex3/ex3.cpp +++ b/example/ex3/ex3.cpp @@ -13,8 +13,8 @@ main () { using xo::flatstring; using namespace std; - constexpr stdquantity t = q::minutes(2); - constexpr stdquantity d = q::kilometers(2.5); + constexpr stdquantity t = q::minutes(2); + constexpr stdquantity d = q::kilometers(2.5); constexpr auto t2 = t*t; constexpr auto a = d / (t*t); diff --git a/include/xo/unit/quantity.hpp b/include/xo/unit/quantity.hpp index f063c277..e1de9279 100644 --- a/include/xo/unit/quantity.hpp +++ b/include/xo/unit/quantity.hpp @@ -158,8 +158,8 @@ namespace xo { Repr scale_ = Repr{}; }; - template NaturalUnit = natural_unit()> + template < natural_unit NaturalUnit = natural_unit(), + typename Repr = double > using stdquantity = quantity; template