(C++) operator-

January 8, 2018 · View on GitHub

 

 

 

 

 

(C++) operator-

 

operator- is the operator for subtracting.

 

The following line of code calls operator- to subtract the values of two integers:

 


const int x = 5 - 2;

 

operator- is encapsulated by the functor std::minus.