Boost logo

Boost :

From: Fernando Cacciola (fcacciola_at_[hidden])
Date: 2001-12-13 10:29:03


----- Original Message -----
From: Fernando Cacciola <fcacciola_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Thursday, December 13, 2001 12:16 PM
Subject: RE: [boost] Re: Formal review: New Boost.Test Library

>
> ----- Original Message -----
> From: Mark Rodgers <mark.rodgers_at_[hidden]>
> To: <boost_at_[hidden]>
> Sent: Thursday, December 13, 2001 11:42 AM
> Subject: Re: [boost] Re: Formal review: New Boost.Test Library
>
>
> > From: "Fernando Cacciola" <fcacciola_at_[hidden]>
> > > What problem exactly?
> > > Giving a definition of A::Impl (which is missing from the example), it
> > works
> > > fine with BCB5.5.1
> >
> > I'm afraid that would defeat the purpose - this is an implementation of
> the
> > pimpl idiom, and so Impl is intended to be not defined at this point.
> >
> Yes, I know that.
> I meant that if you add the definition of A::impl outside A, even below
> foo(), it works.
> I thought that because I put the definition of A::impl *below* foo(), it
> would mimic the effect of having it anywhere else.
>
> However, I realize now that since A::~A() isn't defined it shouldn't need
> the definition of A::impl in this translation unit.
> (which is was Gennadidy was expecting)
>
> I've just tested it putting the definition of A::~A() and A::impl in a
> different source file, and still doesn't work, as it
> clearly should.
>
>
Well, here's what I found:

If you 'disable' the option 'destructor cleanup', in the
C++/ExceptionHandling options section, it does compile without errors.
So it is definitely a bug.
I've seen many other 'side effects' of that option, which appears to be very
poorly implemented, but this is one is a winner!

BTW, it is not a good idea to leave that option OFF, the effect is that
automatic objects don't get destroyed when they leave scope due to a thrown
exception.

I'll report it to Borland.

Fernando Cacciola
Sierra s.r.l.
fcacciola_at_[hidden]
www.gosierra.com


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