26 Numerics library [numerics]

26.8 Generalized numeric operations [numeric.ops]

26.8.14 Least common multiple [numeric.ops.lcm]

template <class M, class N> constexpr common_type_t<M,N> lcm(M m, N n);

Requires: |m| shall be representable as a value of type M and |n| shall be representable as a value of type N. The least common multiple of |m| and |n| shall be representable as a value of type common_type_t<M,N>.

Remarks: If either M or N is not an integer type, or if either is (possibly cv-qualified) bool the program is ill-formed.

Returns: Zero when either m or n is zero. Otherwise, returns the least common multiple of |m| and |n|.

Throws: Nothing.