When should a member function have a const qualifier and when shouldn't it?

Posted by SCFrench on Stack Overflow See other posts from Stack Overflow or by SCFrench
Published on 2010-03-17T14:21:55Z Indexed on 2010/03/17 14:41 UTC
Read the original article Hit count: 386

Filed under:
|
|

About six years ago, a software engineer named Harri Porten wrote this article, asking the question, "When should a member function have a const qualifier and when shouldn't it?" I found it to be the best write-up I could find of the issue, which I've been wrestling with more recently and which I think is not well covered in most discussions I've found on const correctness. Since a software information-sharing site as powerful as SO didn't exist back then, I'd like to resurrect the question here.

© Stack Overflow or respective owner

Related posts about c++

Related posts about const-correctness