Documentation Home >> Headers >> <ratio> Header >> std::ratio_greater class template

The std::ratio_greater class template provides a mechanism for comparing two std::ratio values at compile time, using rational arithmetic.

template <class R1, class R2>
class ratio_greater:
    public see below
{};

R1 and R2 must be instantiations of the std::ratio class template.

The value of std::ratio_greater<R1,R2> is std::ratio_less<R2,R1>::value

If the TR1 std::tr1::integral_constant class template is available, then std::ratio_greater<R1,R2> derives from std::tr1::integral_constant<bool, value >. Otherwise, std::ratio_greater<R1,R2> derives from an internal type that provides a static constant data member value of type bool equal to value.

Header

#include <ratio>

See Also