Debian Codegraph @

gcc/testsuite/g++.dg/contracts/preload_nocontinue_handler/handle_contract_violation.cpp

raw
1 #include <iostream>
2 #include <contract>
3
4 void handle_contract_violation(const std::contract_violation &violation) {
5 std::cerr << "custom handle_contract_violation: " << std::endl
6 << " line_number: " << violation.line_number() << std::endl
7 << " file_name: " << violation.file_name() << std::endl
8 << " function_name: " << violation.function_name() << std::endl
9 << " comment: " << violation.comment() << std::endl
10 << " assertion_level: " << violation.assertion_level() << std::endl
11 << std::endl;
12 }
13