[ratio.general] (original) (raw)

21 Metaprogramming library [meta]

21.5 Compile-time rational arithmetic [ratio]

21.5.1 General [ratio.general]

Subclause [ratio] describes the ratio library.

It provides a class templateratio which exactly represents any finite rational number with a numerator and denominator representable by compile-time constants of typeintmax_t.

Throughout subclause [ratio], 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.