[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdepim/libkcal
From:       Stephan Kulow <coolo () kde ! org>
Date:       2006-04-28 9:10:54
Message-ID: 200604281110.55521.coolo () kde ! org
[Download RAW message or body]

Am Freitag, 28. April 2006 11:05 schrieb Matthias Kretz:
> On Friday, 28. April 2006 09:36, Stephan Kulow wrote:
> > I know const_cast<KCal::Incidence*>(this) is considered hip, but
> > as a matter of fact it's undefined behaviour and every compiler is
> > free to create crashing code
>
> It is undefined behaviour? So const_cast is allowed for everything except
> the this pointer?

You can const_cast as much as you want, but you're not supposed to change
a this in a const function - no matter how you trick it. That said: all known 
compilers can be tricked that way.

Greetings, Stephan
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic