* 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



> 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!  :-)



> What do you think?

I think that I should debug fgfs/sg, not your code snippets,
but anyway:



> void foo(int i) throw(exception&)

Here you say that only class "exception" and its derivatives are
allowed.



> struct EE {
>       E e;
>       EE(const char* s) : e(s) { cout << "EE::EE(" << s << ")" << endl;}
>       virtual ~EE() throw() { cout << "EE::~EE(" << e._msg << ")" << endl;}
> };

But you don't make EE a derivative of "exception":

  struct EE : public exception { ...

m.



PS: FlightGear/SimGear doesn't use "Exception Specifications", so the
    bug in your test program can't really happen.

_______________________________________________
Flightgear-devel mailing list
[email protected]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel
2f585eeea02e2c79d7b1d8c4963bae2d

Reply via email to