libstdc++: std::ratio< _Num, _Den > Struct Template Reference (original) (raw)
#include <[ratio](a00173%5Fsource.html)>
Static Public Attributes | |
---|---|
static constexpr intmax_t | den |
static constexpr intmax_t | num |
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:
Provides compile-time rational arithmetic.
Definition at line 269 of file ratio.
◆ type
template<intmax_t _Num, intmax_t _Den = 1>
Definition at line 282 of file ratio.
◆ den
template<intmax_t _Num, intmax_t _Den = 1>
Definition at line 279 of file ratio.
◆ num
template<intmax_t _Num, intmax_t _Den = 1>
Definition at line 276 of file ratio.
The documentation for this struct was generated from the following file: