Skip to content

mp_units::get_common_unit

The common unit of the arguments. Use std::common_type_t on two quantities instead.

Synopsis

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

[[deprecated("2.6.0: Use `std::common_type_t` on two quantities instead"),
  nodiscard]] consteval Unit auto
get_common_unit(auto u, auto... rest)
  requires requires { mp_units::detail::find_common_unit(u, rest...); };

Warning

Deprecated: 2.6.0: Use `std::common_type_t` on two quantities instead. Use of this entity is allowed but discouraged.

Return Value

Note

The return value should not be discarded.