Debian Codegraph @

gcc/testsuite/g++.dg/contracts/noexcept_preload_handler/README

raw
1 build and install gcc to $prefix, then run:
2 LD_LIBRARY_PATH=$prefix/lib64 CXX=$prefix/bin/g++ make run
3
4 this test has a custom handle_contract_violation that throws an exception
5 this test is built with -fcontract-continuation-mode=on
6
7 since 1) our fun() *IS* marked noexcept even though 2) the continue mode is
8 set to on, we expect the exception thrown within the contract violation
9 handler to quashed and have std::terminate run.
10
11 expected output therefore ends in:
12 terminate called after throwing an instance of 'int'
13
14 despite there being a catch(int &) handler in main
15