In C++11 I am having issue implementing const iterator int my class code (inside .cpp file) I have:
class MyClass{ public: class iterator; iterator begin() const; iterator end() const; class const_iterator; const_iterator begin() const; const_iterator end() const; } But as you may know, I can't implement 2 functions with the same signature, so how may I solve thus?
iterator begin() const;? why is itconst?begin()and one non-constbegin(). It makes no sense to have two constbegin(). If you don't want a non-constbegin()remove it completely.