https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61966

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Sergey Murzin from comment #0)
> Created attachment 33215 [details]
> ii file - 4.8.2
> 
> According to C++ standard 15.2.2 - It's allowed to throw exception from
> class destructor.

In C++11 destructors have noexcept(true) by default, so they're allowed to
throw, but it will call std::terminate.

If you want to throw from destructors they need to have noexcept(false)

Reply via email to