mp_units::quantity::quantity

Construct from Value

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 object to construct from