1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
// ratio_greater_equal example
#include <iostream>
#include <ratio>
int main ()
{
typedef std::ratio<1,3> one_third;
typedef std::ratio<1,2> one_half;
std::cout << "1/3 >= 1/2 ? " << std::boolalpha;
std::cout << std::ratio_greater_equal<one_third,one_half>::value << std::endl;
return 0;
}
|