0

Operator overloading is implemented by member function templates, but how to represent the following operation?

std::list<int> iter;
iter++; // <-- this operation

Can that member function be represented as

std::list<T>::iterator& std::list<T>::iterator::operator++(std::list<T>::iterator& iter) ?

If the above is wrong, then what is the correct full representation?

Kevin Dong
  • 5,001
  • 9
  • 29
  • 62
  • You're calling it on a `std::list`. Whatever overload there is should take a `std::list`. – chris Feb 02 '16 at 04:16
  • Possible duplicate of [Operator overloading](http://stackoverflow.com/questions/4421706/operator-overloading) –  Feb 02 '16 at 04:20

0 Answers0