Topic: Const references (Was: Loop invariance)
Author: Valentin Bonnard <bonnardv@pratique.fr>
Date: 1998/08/18 Raw View
Siemel Naran <sbnaran@bardeen.ceg.uiuc.edu> writes:
> In a future version of C++, it would be nice if
> "T&" in a non-const class becomes "T const&" in a const class
> "T" in a non-const class becomes "T const" in a const class
> And, it allows the compiler to do more aggressive
> optimizations.
As explainned in the article you are following-up to, no.
--
Valentin Bonnard mailto:bonnardv@pratique.fr
info about C++/a propos du C++: http://pages.pratique.fr/~bonnardv/
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]
Author: Valentin Bonnard <bonnardv@pratique.fr>
Date: 1998/08/18 Raw View
Siemel Naran <sbnaran@fermi.ceg.uiuc.edu> writes:
> It wouldn't break old code. If one wants "T&" in a non-const class to remain
> as "T&" in a const class,
[ sniped ]
Which is preciselly the definition of breaking code: perhaps
you can still do it, but the old way to do it doesn't work
anymore.
--
Valentin Bonnard mailto:bonnardv@pratique.fr
info about C++/a propos du C++: http://pages.pratique.fr/~bonnardv/
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html ]