Boost logo

Boost :

From: Frank Mori Hess (frank.hess_at_[hidden])
Date: 2008-04-14 12:22:54


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 14 April 2008 04:50 am, vicente.botet wrote:
> 1.a _exp_throwable has virtual destructor: FUTURE & POET
> 1.b template< class E > class _exp_throwable_impl has virtual destructor:
> FUTURE

> d catch and return for bad_alloc: FUTURE as a header_only library has
> an static initialization of s_bad_alloc (Why POET don't have it) 3

Ah, thanks for noticing that problem in libpoet. I think it's fixed now,
using a template static trick:

http://www.comedi.org/cgi-bin/viewvc.cgi/libpoet/poet/exception_ptr.cpp?r1=1.6&r2=1.7

Something like that may be helpful in Braddock's lib, since his comments
indicate concern about the allocation probably failing.

> 1.a 1.b This seams not necessary, shared pointer calls to the correct
> destructor given on the construtor not the ~T, as Peter as already
> explained in other posts.

It may be worthwhile nontheless, since it quiets the "virtual functions
without virtual destructor" warning from gcc. That could save you bogus bug
reports and maybe even a FAQ entry. Since the class already has a virtual
function, making the destructor virtual doesn't add any per-object overhead,
right?

- --
Frank
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFIA4Tf5vihyNWuA4URAiTNAKCkz05zmqZjaH7LURb0whYduXA94gCg0BpG
rrUKOuw1sr1kqvRDP6t1Aek=
=MtPt
-----END PGP SIGNATURE-----


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