Boost logo

Boost :

From: Jürgen Hunold (hunold_at_[hidden])
Date: 2006-03-14 02:48:27


Hi Andreas !

Am Dingsdag 14 März 2006, 00:38 schrieben Sie:
> Hi Juergen
>
> > I've tried to run the statechart examples and tests with gcc 4.0 using
> > Boost.Build V2.
> >
> > The attached patch corrects some minor glitches:
> > The examples don't run from the "run" directory because gcc's -rpath
> > option is not used when using shared libraries. This is enabled by
> > <hardcode-dll-paths>true
>
> Applied, thanks.

Good.

> project libs/statechart
> # The library ensures that all state destructors are only invoked on
> # the most-derived type, therefore state destructors do not need to
> # be virtual
>
> : requirements <toolset>gcc:<cxxflags>-Wno-non-virtual-dtor ;
>
> Shouldn't that take care of any warnings in test *and* example?

Well, it works now. Fascinating. Maybe I missed an update from anon cvs.
Or Volodya fixed some V2 bug. Sorry for the irritation :-))

> > I simply disabled this warning, but I'm not happy about it. It has
> > been helpful in my own code in the past. Is there any chance to make
> > the destructor virtual when a vtable is needed ?
>
> The destructors are not virtual for performance reasons (see comment
> above on how correctness is ensured). The vtable is needed for typeid,
> that's why there's a dummy.

Yes, I read the comment. I understand that performance is quite critical.
I just did not like the fact the I've got to disable this specific gcc
warning. The real cure would be some gcc magic tom disable this specific
warning for this one file only, like msvc has.

Thanks for the explanation.

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
* hunold_at_[hidden]          ! www.ive-mbh.de

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