mutable data members

Christian Parpart cparpart at surakware.net
Thu Jan 23 01:49:15 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 22 January 2003 1:22 pm, Waldo Bastian inspired the electrons to 
say:
> 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.

Greetings,
Christian Parpart.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+L0odPpa2GmDVhK0RAvxvAJ9qI9CWWpGdQBBG2BrtRgu6IGlBKgCeK4Vs
g+zmRoxrdk0LGISH/UuBzpY=
=ihNr
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list