Open JohelEGP opened 1 week ago
Don't we need to restrict T
to not be a specialization of quantity
and quantity_point
?
Good points!
Interfaces were different, but we unified them with #531. I am fine with refactoring as long as we do not provide public subsumptions between those two concepts.
Don't we need to restrict T to not be a specialization of
quantity
andquantity_point
?
Another good idea. But we should use derived_from_specialization_of
instead, as some users do inherit from our types, and we already account for that in interfaces (e.g., operators).
Title: refactor(core): factor out common quantity-like requirements
Description:
QuantityLike
andQuantityPointLike
share many requirements: https://github.com/mpusz/mp-units/blob/89bafed9619a4a8320046e2be621172a6e88b586/src/core/include/mp-units/framework/quantity_concepts.h#L73-L83 https://github.com/mpusz/mp-units/blob/89bafed9619a4a8320046e2be621172a6e88b586/src/core/include/mp-units/framework/quantity_point_concepts.h#L137-L151I suggest factoring them out, for example:
See also:
626.