header

<ratio>

Ratio header
This header declares the ratio class template and several auxiliary types to operate with them.

A ratio expresses a proportion (such as 1:3, or 1000:1) as a set of two compile-time constants (its numerator and its denominator). The type itself is used to express the ratio (objects of these types hold no value).

Within the standard library, ratio types are used as template parameters for duration objects (see chrono header).

Classes


ratio arithmetic:


ratio comparison: