20 General utilities library [utilities]

20.10 Compile-time rational arithmetic [ratio]

20.10.1 In general [ratio.general]

This subclause describes the ratio library. It provides a class template ratio which exactly represents any finite rational number with a numerator and denominator representable by compile-time constants of type intmax_t.

Throughout this subclause, if the template argument types R1 and R2 are not specializations of the ratio template, the program is ill-formed.