C
coal
Previously I've suggested permitting some modification to the
default behaviour wrt to exceptions thrown in a constructor.
http://preview.tinyurl.com/278u77
My guess is the default behaviour was decided when networking
was less prevalent and should be reconsidered now.
I'm not sure if the syntax/mechanism I suggested is good.
If you have
class Base { ...};
class Inter : public Base { ...};
class Derived : public Inter { ... };
and
Base* b = new (preserve) Derived(...);
and an exception comes from Derived's constructor, b would be
set to the Inter object since that much was built successfully.
I'm not sure if/how the syntax would fit in with placement new.
The rationale for preserving a base object is because the sender,
network and receiver have invested quite a bit in getting to the
point of having an Inter. Throwing everything away doesn't make
sense to me.
Brian Wood
Ebenezer Enterprises
www.webebenezer.net
default behaviour wrt to exceptions thrown in a constructor.
http://preview.tinyurl.com/278u77
My guess is the default behaviour was decided when networking
was less prevalent and should be reconsidered now.
I'm not sure if the syntax/mechanism I suggested is good.
If you have
class Base { ...};
class Inter : public Base { ...};
class Derived : public Inter { ... };
and
Base* b = new (preserve) Derived(...);
and an exception comes from Derived's constructor, b would be
set to the Inter object since that much was built successfully.
I'm not sure if/how the syntax would fit in with placement new.
The rationale for preserving a base object is because the sender,
network and receiver have invested quite a bit in getting to the
point of having an Inter. Throwing everything away doesn't make
sense to me.
Brian Wood
Ebenezer Enterprises
www.webebenezer.net