feat: quantity_point converting constructor now takes into account convertibility of the quantity type

This commit is contained in:
Mateusz Pusz
2023-05-16 14:08:36 +02:00
parent 1dae61e1c8
commit 978ce4093a

View File

@@ -101,9 +101,10 @@ public:
{ {
} }
template<QuantityPointOf<point_origin> QP2> template<QuantityPointOf<point_origin> QP>
requires std::convertible_to<typename QP2::quantity_type, quantity_type> requires std::constructible_from<quantity_type, typename QP::quantity_type>
constexpr explicit(false) quantity_point(const QP2& qp) : q_(qp.relative()) constexpr explicit(!std::convertible_to<typename QP::quantity_type, quantity_type>) quantity_point(const QP& qp) :
q_(qp.relative())
{ {
} }