Reputation: 10153
I am implementing class graph
.
In similar to stl
,I think ,that the signature of insert function should be
pair<iterator,bool> insert ( const value_type& x );
For my class I have implemented iterator
and const_iterator
.
Should I define 2 i(overloaded) insert
functions : one which will return pair<iterator,bool>
and the second which will return pair<const_iterator,bool>
Upvotes: 1
Views: 104
Reputation: 182769
No, there's no need. You can't call insert
on a const
collection anyway.
Upvotes: 2