mp_units::quantity::quantity

Constructors

Synopses

Declared in <mp-units/framework/quantity.h>
Default constructor
quantity() = default;


» more... Copy constructor
quantity(quantity const& other) = default;


» more... Copy constructor
template<
    auto R2,
    typename Rep2>
requires detail::QuantityConstructibleFrom<quantity, quantity<R2, Rep2>>
constexpr
explicit(!implicitly_convertible(get_quantity_spec(R2), quantity_spec) || !std::convertible_to<Rep2, rep>)
quantity(quantity<R2, Rep2> const& q);


» more... Move constructor
quantity(quantity&& other) = default;


» more... Construct from Q
template<QuantityLike Q>
requires detail::QuantityConstructibleFrom<quantity, detail::quantity_like_type<Q>>
constexpr
explicit(quantity_like_traits<Q>::explicit_import || !std::convertible_to<detail::quantity_like_type<Q>, quantity<R, Rep>>)
quantity(Q const& q);


» more... Construct from FwdValue
template<typename FwdValue>
requires detail::DimensionlessOne<reference> && detail::ValuePreservingConstruction<rep, FwdValue>
constexpr
explicit(!std::convertible_to<FwdValue, rep>)
quantity(FwdValue&& val);


» more... Constructor
template<
    typename FwdValue,
    Reference R2>
requires (!equivalent(unit, get_unit(R2{}))) &&
            detail::QuantityConstructibleFrom<quantity, quantity<R2{}, std::remove_cvref_t<FwdValue>>>
constexpr
quantity(
    FwdValue&& val,
    R2);


» more... Constructor
template<
    typename FwdValue,
    Reference R2>
requires (equivalent(unit, get_unit(R2{}))) && detail::ValuePreservingConstruction<rep, FwdValue>
constexpr
quantity(
    FwdValue&& val,
    R2);


» more...

Created with MrDocs