Re: [boost] [Boost.Config] Detect compiler support for std::current_exception

Thanks!
But that defeats the whole purpose of having tests. I think I should at least use the type std::exception_ptr, and make sure the functions std::current_exception() and std::rethrow_exception() exist (even if I cannot test that they actually work as expected at runtime). I think the following should work, and at least the test tests something when exceptions are off: using std::exception_ptr; auto current = &std::current_exception; auto rethrow = &std::rethrow_exception; What do you think?

On 6/17/19 1:09 PM, dariomt--- via Boost wrote:
Not really. You would still test the facilities when exceptions are enabled. OTOH, I don't see why would anyone care about these components when exceptions are disabled.
If it works, that would be fine by me. I don't disable exceptions and I don't know whether the standard library components related to exceptions stay available when exceptions are disabled. I wouldn't be surprised if they don't (now or in a future version of the standard library implementation). In any case, as I said, I don't see anyone using these components when exceptions are disabled, so not much point in testing.
participants (2)
-
Andrey Semashev
-
dariomt@gmail.com