Skip to content

Latest commit

 

History

History
48 lines (27 loc) · 930 Bytes

CppOperatorLess.md

File metadata and controls

48 lines (27 loc) · 930 Bytes

 

 

 

 

 

 

operator< is the operator to determine if the left-hand instance is less or equal the right-hand instance.

 

The following code uses operator< to determine that one plus two is less than four:

 


#include <iostream> int main() {   if (1 + 2 < 4) std::cout << "One plus two is less or equal than four\n"; }

 

operator< is encapsulated by the functor std::less.