(C++) operator>
January 8, 2018 · View on GitHub
(C++) operator>
operator> is the operator to determine if the left-hand instance is greater than the right-hand instance.
The following code uses operator> to determine that two plus three is greater than four:
#include <iostream> int main() { if (2 + 3 > 4) std::cout << "Two plus three is greater than four.\n"; }
operator> is encapsulated by the functor std::greater.