operator/ is the operator for dividing.
The following line of code calls operator/ to divide the values of two integers:
operator/ is encapsulated by the functor std::divides.
#include <cassert> struct Test { Test(const int x = 0) : mX(x) {} int mX; }; const Test operator/(const Test& lhs, const Test& rhs) { return Test( lhs.mX / rhs.mX ); } int main() { const Test t1(12); const Test t2(4); const Test t3 = t1 / t2; assert(t3.mX == 3); }