On 16 September 2013 14:54, Neil Groves wrote:
The use of an explicit try-catch block is rarely the optimal solution in a destructor. I don't think we should consider recommending this practice. I am open to exploring the potential solutions involving decorating the destructor declarations/definitions to improve behaviour across compiler versions. I am unclear about how clever the C++11 has_trivial_destructor meta-functions are. Do they generally work when an explicitly defined noexcept destructor is declared?
I don't know about in general, but libstdc++'s does, yes. It's
basically implemented in terms of noexcept(std::declval