19
General utilities library
[utilities]
19.16
Compile-time rational arithmetic
[ratio]
19.16.1
In general
[ratio.general]
1
#
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
.
2
#
Throughout this subclause, the names of template parameters are used to express type requirements
.
If a template parameter is named
R1
or
R2
, and the template argument is not a specialization of the
ratio
template, the program is ill-formed
.