std::ratio< _Num, _Den > Struct Template Reference
[Rational Arithmetic]

Provides compile-time rational arithmetic. More...

List of all members.

Public Member Functions

Static Public Attributes

Detailed Description

template<intmax_t _Num, intmax_t _Den = 1>
struct std::ratio< _Num, _Den >

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;

Definition at line 151 of file ratio.

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

Generated on Thu Jul 23 21:18:07 2009 for libstdc++ by  doxygen 1.5.8