Skip to content

mp_units::get

Synopsis

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

template<std::size_t Idx, auto R1, typename Rep1>
  requires DecomposableIndex<get_quantity_spec(R1), Rep1, Idx>
[[nodiscard]] constexpr Quantity auto get(quantity<R1, Rep1> const& q);

Note

This function is a hidden friend of quantity, declared inside an implementation-defined base class: it can be found only through argument-dependent lookup.

Return Value

Note

The return value should not be discarded.

Parameters

NameDescription
qA quantity