This is the mail archive of the
egcs-bugs@egcs.cygnus.com
mailing list for the EGCS project.
Re: Throw & catch bug?
- To: jorgefm@cirsa.com
- Subject: Re: Throw & catch bug?
- From: Ross Smith <ross.s@ihug.co.nz>
- Date: Thu, 08 Jul 1999 11:30:18 +1300
- CC: egcs-bugs@egcs.cygnus.com
- Organization: The Internet Group
- References: <C12567A7.002D5D10.00@ntdes.lgcirsa.com>
jorgefm@cirsa.com wrote:
>
> How can the destructor call twice, one after throw (incorrect) and the
> second and ok at the end of the catch.
You forgot to put any instrumentation in the copy constructor. The
compiler is behaving correctly: throwing an exception *always* copies
the object.
--
Ross Smith <ross.s@ihug.co.nz> The Internet Group, Auckland, New Zealand
========================================================================
The good news, according to the FCC, is that television viewing won't be
interrupted by the Y2K problem. The bad news, according to the rest of
us, is that television viewing won't be interrupted by the Y2K problem.
-- Jonathan Erickson in Dr Dobb's Journal