RE: [Re: [gtkmm] ANNOUNCE: gtkmm 2.2.8]
- From: Murray Cumming Comneon com
- To: chris cvine freeserve co uk, bradleyb u washington edu
- Cc: gtkmm-list gnome org
- Subject: RE: [Re: [gtkmm] ANNOUNCE: gtkmm 2.2.8]
- Date: Mon, 6 Oct 2003 07:45:02 +0200
> From: Chris Vine [mailto:chris cvine freeserve co uk]
> I will not be installing gtk+-2.3. Once gtk+-2.4 is out
> against which I can
> test gtkmm-2.3, I will submit a patch unless someone has
> already done that.
I think it is sensible not to install gtk+ 2.3 on top of gtk+ 2.2 yet, but
that does not mean that we should not be using it for development. It is
very easy to use a separate, additional, install prefix. And it is very very
easy with jhbuild (from gnome's cvs).
> > I think that, wherever a static_cast<> worked, a C-style cast (or a
> > reinterpret_cast<>) is probably OK. If multiple-inheritance
> was an issue
> > there then we would have had to use a dynamic_cast<>
> anyway. In this case,
> > the class is not multiply inherited.
>
> This is not quite right. A static_cast casting down an
> inheritance path will
> carry out offset calculations where necessary, and one case
> where it is
> necessary is multiple inheritance. A static_cast of pointers
> and references
> can be used with multiple inheritance unless the inheritance
> is virtual and
> the cast is from a shared base class (that is, the
> inheritance tree is
> diamond shaped), in which case as you say a dynamic_cast must
> be used when
> casting from the virtual base to a child which inherits it
> from two parents.
> The offset calculations made by the compiler with a valid
> static_cast with
> multiple inheritance will not occur with a reinterpret_cast,
> so the two will
> not necessarily give the same result.
Yes, I was thinking of virtual inheritance, not just multiple inheritance.
Murray Cumming
murrayc usa net
www.murrayc.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]