Rechercher une page de manuel
std::ratio.3cxx
Langue: en
Version: 350920 (ubuntu - 24/10/10)
Section: 3 (Bibliothèques de fonctions)
Sommaire
NAME
std::ratio -Provides compile-time rational arithmetic.
SYNOPSIS
Public Member Functions
static_assert (_Den!=0,'denominator cannot be zero')
static_assert (_Num >=-__INTMAX_MAX__ &&_Den >=-__INTMAX_MAX__,'out of range')
Static Public Attributes
static const intmax_t den
static const 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 151 of file ratio.
Author
Generated automatically by Doxygen for libstdc++ from the source code.
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre