Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp1z
/
noexcept-type7.C
blob: aabeeda3856e139ea88a3559b723dabaf120a7e3 [
file
] [
log
] [
blame
]
// Test for static_cast.
// { dg-do compile { target c++17 } }
void
f
()
{
typedef
void
(*
P
)();
typedef
void
(*
NP
)()
noexcept
;
P p
;
NP np
;
static_cast
<
P
>(
np
);
static_cast
<
NP
>(
p
);
// { dg-error "3:invalid .static_cast." }
}