Re: [gtkmm] ANNOUNCE: gtkmm 2.2.8



On Wednesday 01 October 2003 8:25 pm, Chris Vine wrote:

> I am checking.  Put it this way, parent to child conversion with private
> inheritance has worked with static_cast on every compiler I have used.  It
> is possible that a gcc snapshot has made gcc compliant with the standard
> after a considerable period of non-compliance, but other outcomes are more
> likely. (You may have me eating humble pie later).

You have me eating humble pie.  The standard requires static_cast to obey 
access controls.  Full marks to you, and there are a lot of non-compliant 
compilers out there, and probably quite a lot of code broken by the standard 
now being complied with by gcc.  (However, you are a brave man basing your 
findings on an unreleased version of gcc.)

I wonder if the relevant private derivation in gtkmm needs to be reviewed.  
reinterpret_casts generally seem like desperation, and changing the access 
type of the derivation seems a preferable way of ensuring compliance with the 
standard.

Chris.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]