MS CRT provides implementation of those handler functions, defer to them.
Details
Diff Detail
Event Timeline
test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp | ||
---|---|---|
32 | This assertion does not hold for MSVCRT, as a null handler represents the default behavior. Would it be better to make this check conditionally instead of marking the whole test as failed? | |
40 | This does not hold for MSVCRT either. Assuming the previous assertion is skipped for it, this could be tested by setting the unexpected handler to its original value and calling unexpected(). |
This looks OK to me.
Ugly, but OK.
test/depr/exception.unexpected/set.unexpected/get_unexpected.pass.cpp | ||
---|---|---|
32 | I believe that this check is incorrect. | |
40 | Yes, I think that's better. |
You will also need to change the test:
test/depr/exception.unexpected/set.unexpected/set_unexpected.pass.cpp
as it makes similar assumptions about an initial non-null handler.
This assertion does not hold for MSVCRT, as a null handler represents the default behavior. Would it be better to make this check conditionally instead of marking the whole test as failed?