Re: [gtkmm] Replacing dynamic_cast<> with static_cast<> - compiler error.
- From: "Paulo Pinto" <pjmlp progtools org>
- To: "gtkmm-main" <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Replacing dynamic_cast<> with static_cast<> - compiler error.
- Date: Wed, 18 Sep 2002 15:42:56 +0100
Which means that the dynamic_cast can't be safely replaced.
So there's no use in trying to solve that bug that Murray
was refering to. Just tell people to upgrade their compilers.
Paul Pinto
----- Original Message -----
From: "Paul Davis" <pbd op net>
To: "Paulo Pinto" <pjmlp progtools org>
Cc: "gtkmm-main" <gtkmm-list gnome org>
Sent: Wednesday, September 18, 2002 3:31 PM
Subject: Re: [gtkmm] Replacing dynamic_cast<> with static_cast<> - compiler
error.
> >Right. I know that it doesn't sound pretty but we could replace the
> >dynamic_cast with a reinterpret_cast or even an old style cast (ugh
> >did I just said that?).
>
> no, you cannot do either of those things.
>
> dynamic_cast is responsible for returning an address that in many/most
> cases will be offset from its argument. reinterpret_cast simply
> returns the bit pattern of its argument in a form suitable for use as
> the type requested. that is completely different from what
> dynamic_cast does. an old style cast does the same thing for
> pointers.
>
> --p
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]