Hi Melchior,
thanks for the help.

> * Vassilii Khachaturov -- Saturday 26 November 2005 11:02:
> > > But ... classes without copy/assignment operator aren't copied
> > > byte-by-byte, but member-by-member[1].
>
> > It's a pity I am at home & sick, and without the book. I don't know
> > what is written in the section you refer to.
>
> There's written what I said: that classes without copy/assignment
> operator aren't copied byte-by-byte, but member-by-member. I'm
> not going to cite the whole book. You have to trust me.  :-P

sure... Since now I see the code behaves that way, too :)

> > Therefore the only
> > thing I can do is try to code it and see what's happening. I tried to
> > amend the snippet with a 3rd case, which crashes on my machine,
>
> No, it doesn't "crash your machine". It calls std::unexpected()
> because you throw an exception that you *explicitly* disallowed.
> That's a feature!  :-)

yeah, right... and I never added a handler catching EE in the catch loop,
so it aborts even w/o the exception specification. Fixing those shows
(e.g. by adding EE's inheritance from exception (as you suggested), and
catching an exception& instead of E&) that everything works, and that the
E's copy ctor does auto-fire when the EE gets cloned via the default copy
ctor semantics - it's fixed at
http://www.tarunz.org/~vassilii/locally-created-exceptions.cpp

> > What do you think?
>
> I think that I should debug fgfs/sg, not your code snippets,

...which of course have no relation to fgfs/sg debugging :-)))

> [snip]

thanks for catching this one. I'll 1) go to sleep and hope that
the flu will go away enough to get thinking sanely again 2) will try
not to submit lengthy patches coded up when being sick before
reviewing them myself being sane 3) re-read the BS book ASAP in
case I forgot smth else out of C++

V.


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@flightgear.org
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to