Computes the common unit of two convertible units

Synopsis

Declared in <mp‐units/framework/reference.h>

template<
    Unit U1,
    /* implementation-defined */ U2>
[[nodiscard]]
consteval
Unit auto
get_common_unit(
    U1 u1,
    U2 u2);

Return Value

the common unit of u1 and u2

Note

The return value should not be discarded.

Parameters

Name

Description

u1

first unit

u2

second unit

Created with MrDocs