mutable data members
cparpart at surakware.net
Thu Jan 23 01:49:15 GMT 2003
-----BEGIN PGP SIGNED MESSAGE-----
On Wednesday 22 January 2003 1:22 pm, Waldo Bastian inspired the electrons to
> On Wednesday 22 January 2003 12:32, Waldo Bastian wrote:
> > On Wednesday 22 January 2003 12:14, Cornelius Schumacher wrote:
> > > Is there a special reason why we don't use the "mutable" C++ keyword in
> > > KDE?
> > Dunno, this is what kclipboard.cpp has to say about it:
> For the record and before this starts a live on its own:
> There seemed to be some misunderstanding in the kclipboard.cpp source and
> mutable works just fine, even on gcc 2.95.3. No reason not to use it.
The problem rather is, that lots of coders doesn't know about "mutable". Since
it isn't that long time part of the C++ standard, as well as that it isn't
described in most books hopping around. So, the answer why it isn't used in
KDE (or better: rarely) is because the coders responsible for such
const_cast<> or even reinterpret<>-alike (foo *) simple didn't know about.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the kde-core-devel