table of contents
std::ratio< _Num, _Den >(3cxx) | std::ratio< _Num, _Den >(3cxx) |
NAME¶
std::ratio< _Num, _Den > - Provides compile-time rational arithmetic.
SYNOPSIS¶
Public Types¶
typedef ratio< num, den > type
Static Public Attributes¶
static constexpr intmax_t den
static constexpr intmax_t num
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 266 of file ratio.
Member Typedef Documentation¶
template<intmax_t _Num, intmax_t _Den = 1> typedef ratio<num, den> std::ratio< _Num, _Den >::type¶
Definition at line 279 of file ratio.
Member Data Documentation¶
template<intmax_t _Num, intmax_t _Den = 1> constexpr intmax_t std::ratio< _Num, _Den >::den [static], [constexpr]¶
Definition at line 276 of file ratio.
template<intmax_t _Num, intmax_t _Den = 1> constexpr intmax_t std::ratio< _Num, _Den >::num [static], [constexpr]¶
Definition at line 273 of file ratio.
Author¶
Generated automatically by Doxygen for libstdc++ from the source code.
Sun Jan 8 2023 | libstdc++ |