const functions?

S

saneman

Does the two below declarations mean the same?


iterator find(const key_type &) const;

iterator find(key_type const &) const;


As can be seen they only differ by the const in the argument.
 
V

Victor Bazarov

saneman said:
Does the two below declarations mean the same?


iterator find(const key_type &) const;

iterator find(key_type const &) const;


As can be seen they only differ by the const in the argument.

They don't differ. The position of 'const' WRT the type it
makes const does not matter.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,947
Members
47,501
Latest member
Ledmyplace

Latest Threads

Top