This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why does this not compile?
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: Matthijs van Duin <gcc at nubz dot org>
- Cc: gcc at gcc dot gnu dot org, vharron at soe dot sony dot com, aoliva at redhat dot com
- Date: Mon, 20 May 2002 00:14:42 +0200
- Subject: Re: Why does this not compile?
- References: <1021835697.25496.ezmlm@gcc.gnu.org><v04220802b90dd1bafadf@[194.134.44.75]>
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.