------- Comment #11 from redi at gcc dot gnu dot org 2009-08-27 15:19 ------- (In reply to comment #10) > > I'm not sure that this applies in this situation. An instance of BadE is > constructed because it is thrown, but BadE::BadE does not "[exit] via an > uncaught exception". It both throws and catches an exception, and then > returns > normally. There is still an uncaught exception when BadE::BadE exits, but it > is the one that caused BadE to be constructed, not the one that BadE::BadE has > thrown (and caught).
No, in [except.handle]/16 the standard says "The exception being handled is rethrown if control reaches the end of a handler of the function-try-block of a constructor or destructor." You cannot swallow exceptions in a constructor's function-try-block, they will be rethrown. > -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41174