blob: 65222635c2bda3b45a82a924a9e921984b0b7f00 [file] [log] [blame]
#include <cassert>
#include <exception>
void throw_exception() {
throw 1;
}
int main() {
std::set_unexpected(throw_exception);
try {
std::unexpected(); // it is OK to throw exception from std::unexpected()
assert(false);
} catch (int) {
assert(true);
} catch (...) {
assert(false);
}
return 0;
}