1

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>

1 Answer 1

2

No, there's no need. You can't call insert on a const collection anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.