Constructors
Synopses
Declared in <mp‐units/framework/quantity.h>
Default constructor
quantity() = default;
Construct from quantity
template<
auto R2,
typename Rep2>
requires detail::QuantityConstructibleFrom<quantity, quantity<R2, Rep2>> && (equivalent(unit, get_unit(R2)))
constexpr
explicit(!mp_units::implicitly_convertible(get_quantity_spec(R2), quantity_spec) || !mp_units::implicitly_scalable<get_unit(R2), Rep2, unit, rep>)
quantity(quantity<R2, Rep2> const& q);
Construct from quantity
template<
auto R2,
typename Rep2>
requires detail::QuantityConstructibleFrom<quantity, quantity<R2, Rep2>> && (!equivalent(unit, get_unit(R2)))
constexpr
explicit(!mp_units::implicitly_convertible(get_quantity_spec(R2), quantity_spec) || !mp_units::implicitly_scalable<get_unit(R2), Rep2, unit, rep>)
quantity(quantity<R2, Rep2> const& q);
Construct from rep
Construct from Value
template<typename Value>
requires detail::ExplicitFromNumber<reference> && detail::RepConvertibleFrom<rep, Value> &&
(!std::convertible_to<Value, rep>)
constexpr
explicit
quantity(Value val);
Construct from Value
template<typename Value>
requires detail::ExplicitFromNumber<reference> && (!detail::RepConvertibleFrom<rep, Value>)
constexpr
explicit(!std::convertible_to<Value, rep> || !mp_units::implicitly_convertible(quantity_spec, dimensionless))
quantity(Value val) = delete;
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);
Constructor
Constructor
Constructor
Created with MrDocs