On 11/5/18 6:41 AM, Lorenzo Caminiti via Boost wrote:
Hello all,
std::uncaught_exception (singular) is deprecated in C++17 and will be removed in C++20. std::std::uncaught_exceptions (plural) should be used instead.
Will Boost.Config have a macro to detect if std::uncaught_exceptions is supported or not by the current compiler?
(For example, Boost.Contract implementation uses std::uncaught_exception and it will need to use std::uncaught_exceptions on C++20 compilers instead.)
Since you have to include <exception> anyway, you could test for __cpp_lib_uncaught_exceptions. BTW, there are ways to implement std::uncaught_exceptions on some pre-C++17 compilers, this is implemented in Boost.Log: https://github.com/boostorg/log/blob/develop/src/unhandled_exception_count.c... It might be a good idea to move that code somewhere for public use, e.g. in Boost.Exception. Opinions?