|
-
January 12th, 2009, 05:48 AM
#2
Re: Why Non Member Function cannot declared with const ?
Because there´s no object const correctness can be applied to. If you declare a member function const you promise not to modify the observable state of the object you call the function on. Non member functions do not have an object they belong to, so what do you promise not to change?
- Guido
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|