Sign in
gnu
/
gcc
/
refs/heads/devel/c++-contracts
/
.
/
gcc
/
testsuite
/
g++.dg
/
contracts
/
noexcept_preload_handler
/
assert_fail.cpp
blob: 8ae98fbe668b1884c7e6d1705c914eb1183a7de1 [
file
] [
log
] [
blame
]
#include
<iostream>
#include
<contract>
int
fun
()
noexcept
{
int
x
=
0
;
[[
assert
:
x
<
0
]];
return
0
;
}
int
main
(
int
argc
,
char
**)
{
try
{
fun
();
}
catch
(
int
&
ex
)
{
std
::
cerr
<<
"synth caught indirect: "
<<
ex
<<
std
::
endl
;
}
return
0
;
}