forked from mpusz/mp-units
Merge branch 'master' of github.com:mpusz/units
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
||||
- **0.7.0 WIP**
|
||||
- (!) refactor: `ScalableNumber` renamed to `QuantityValue`
|
||||
- (!) refactor: output stream operators moved to the `units/quantity_io.h` header file
|
||||
- refactor: `quantity_point` (partially) updated to reflect latest changes to `quantity`
|
||||
- refactor: quantity (kind) point updated to reflect latest changes to `quantity`
|
||||
- refactor: basic concepts, `quantity` and `quantity_cast` refactored
|
||||
- refactor: `abs()` definition refactored to be more explicit about the return type
|
||||
- feat: quantity (point) kind support added (thanks [@johelegp](https://github.com/johelegp))
|
||||
|
||||
@@ -8,3 +8,6 @@ Customization Points
|
||||
|
||||
.. doxygenstruct:: units::quantity_like_traits
|
||||
:members:
|
||||
|
||||
.. doxygenstruct:: units::quantity_point_like_traits
|
||||
:members:
|
||||
|
||||
@@ -53,3 +53,14 @@ such an explicit conversion::
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
quantity q = 1s; // ERROR
|
||||
|
||||
For external quantity point-like types, `quantity_point_like_traits` is also provided.
|
||||
It works just like `quantity_like_traits`, except that
|
||||
``count(T)`` is replaced with ``relative(T)`` that returns the `QuantityLike` value.
|
||||
|
||||
Similar to `quantity` and `quantity_kind`, `quantity_point` and `quantity_kind_point`
|
||||
provide a deduction guide from `QuantityPointLike`::
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
static_assert(quantity_point{std::chrono::sys_seconds{1s}} + 1_q_s == quantity_point{2s});
|
||||
|
||||
Reference in New Issue
Block a user