Boost logo

Boost :

Subject: Re: [boost] Double free from UTF
From: Juergen Hunold (juergen.hunold_at_[hidden])
Date: 2009-09-29 06:00:48


Hi Gennadiy

On Tuesday 29 September 2009, Gennadiy Rozental wrote:
> Juergen Hunold <juergen.hunold <at> ivembh.de> writes:

> > And as mentioned in another thread, using virtual destructors and
> > getting rid of the (now even old-style casts ( ) might be a much
> > better idea.
>
> You can read my reply there. By the way, I am not a language lawyer,
> but it seems that the fact that making destructor virtual resolved
> the issue is just a coincidence. In other words with slightly
> different compiler implementation I see nothing preventing it to
> generate the same problem in case of virtual destructor.

Okay, point taken. But why do you use old-style casts instead of the
static_cast<>s you used before ?
This will make it difficult to compile the "included"-Variant using "-
Wold-style-cast". I'm quite surprised that you use those casts at all.
This is worrying me as "modern" casts tend to prevent subtle bugs.

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        ! www.ivembh.de
* 
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk