1 // Basic test to ensure that guarded templates correctly serialize and
2 // deserialize their contracts through the CMI.
3 // { dg-additional-options "-fmodules-ts -fcontracts -fcontract-continuation-mode=on" }
6 #include <experimental/contract>
8 // { dg-module-cmi foo }
10 export int violation_count{0};
11 export extern "C++" void handle_contract_violation(const std::experimental::contract_violation &violation)
14 printf("violation_count: %d\n", violation_count);
17 export int nontemplate(int n)
30 printf("%s(%d)\n", __FUNCTION__, n);
39 printf("%s(%d)\n", __FUNCTION__, n);