This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why does this not compile?


Matthijs van Duin <gcc@nubz.org> writes:

> it's funny, when I see code of fellow students or even teachers, it
> seems that hardly anyone bothers to use const-qualifiers, or
> qualifiers in general

During my C++ days, I've repeatedly read rules of thumb like "const
creates constant confusion", referring to poisonous aspect of const
(once you add it somewhere, you have to add it in many places).  Maybe
that feeling carries over to the pass-by-reference-to-constant-object
case, which is rather unwarranted, of course.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]