Small documentation update

- default value for quantity representation
This commit is contained in:
Mateusz Pusz
2019-07-24 11:33:15 +02:00
parent df7edd6377
commit 0a7aa690b9

View File

@ -244,11 +244,11 @@ concept Quantity =
detail::is_quantity<T>; // exposition only detail::is_quantity<T>; // exposition only
``` ```
`units::quantity` provides the interface really similar to `std::chrono::duration` with additional `units::quantity` provides the interface really similar to `std::chrono::duration`. The difference is that
member types and functions as below: it uses `double` as a default representation and has a few additional member types and functions as below:
```cpp ```cpp
template<Unit U, Scalar Rep> template<Unit U, Scalar Rep = double>
class quantity { class quantity {
public: public:
using unit = U; using unit = U;
@ -278,6 +278,8 @@ public:
(ratio_divide<typename U1::ratio, typename U2::ratio>::den == 1)) (ratio_divide<typename U1::ratio, typename U2::ratio>::den == 1))
[[nodiscard]] constexpr Quantity operator/(const quantity<U1, Rep1>& lhs, [[nodiscard]] constexpr Quantity operator/(const quantity<U1, Rep1>& lhs,
const quantity<U2, Rep2>& rhs); const quantity<U2, Rep2>& rhs);
// ...
}; };
``` ```