libstdc++
std::ratio Struct Reference

List of all members.

Public Types

Public Member Functions

Static Public Attributes


Detailed Description

Provides compile-time rational arithmetic.

This class template represents any finite rational number with a numerator and denominator representable by compile-time constants of type intmax_t. The ratio is simplified when instantiated.

For example:

    std::ratio<7,-21>::num == -1;
    std::ratio<7,-21>::den == 3;

The documentation for this struct was generated from the following file: