[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: framesets in kword
From: Waldo Bastian <bastian () kde ! org>
Date: 2000-06-15 2:56:35
[Download RAW message or body]
On Wed, 14 Jun 2000, Carsten Pfeiffer wrote:
> On Wed, Jun 14, 2000 at 03:47:35PM -0700, Waldo Bastian wrote:
>
> Hiya,
>
> > You do get better core-dumps though :-) Because a wrong dynamic casts
> > gives you a null-pointer and and a wrong static casts gives you...
> > well... garbage.
> >
> > And I think it checks that it is actually a cast in the inheritance tree
> > and preserves const-correctness.
>
> This is exactly what static_cast does. static_cast actually gives a
> compile-time error, if you're trying to cast const away, or from
> incompatible types. If you prefer the core-dump tho... ;o) No,
> dynamic_cast does the same, just it also lets you down-cast along the
> inheritance tree.
>
> > So I wouldn't say it's bad practice to use dynamic_casts.... I would
> > rather say that it is bad practice to use static_casts.
>
> You mean C-style casts.
It looks like I'm confused with those yes.
/me blames the weather... it's over 100 F here (about 40C)
Cheers,
Waldo
--
Make way, KDE/Linux is coming to a desktop near you!
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic