On 9 Sep 2013 at 18:41, Andrzej Krzemienski wrote:
Your analysis is correct, but in practice the problem described by Daryle still exists. Authors of classes that throw in destructors need to take some action if they have written their libraries in C++03: either mark destructors as noexcept(false) or embed a sub-object (member or base class) that has a noexcept(false) destructor.
In C++03 it was always best practice to *always* wrap your destructors in a try...catch clause. Now it's somewhat mandatory. As an aside, we could really do with some new compiler warnings on this actually. I already get caught enough times forgetting to mark move constructors as noexcept, without which some STL implementations will silently disable move construction completely. Niall -- Currently unemployed and looking for work. Work Portfolio: http://careers.stackoverflow.com/nialldouglas/