mp_units::quantity::quantity

Constructs a quantity from a value convertible to rep, without an explicit reference.

Synopsis

Declared in <mp-units/framework/quantity.h>

template<typename Value>
requires detail::ExplicitFromNumber<reference> && detail::RepConstructibleFrom<rep, Value> &&
             (!std::convertible_to<Value, rep>)
[[nodiscard]]
constexpr
explicit
quantity(Value val);

Return Value

NOTE

The return value should not be discarded.

Parameters

NameDescription
valthe numerical value to store, convertible to rep