Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
template
/
cast6.C
blob: 743eadaa5dd8239a47adf43a9720eb6879a996a4 [
file
] [
log
] [
blame
]
// PR c++/95728
template
<
typename
T
>
void
construct
(
T
*
p
)
{
::
new
(
static_cast
<
void
*>(
p
))
T
;
}
// { dg-error "invalid .static_cast." }
template
<
typename
T
>
void
f
(
const
T
*
t
)
{
construct
(
t
);
}
int
main
()
{
int
i
[
1
];
f
(
i
);
}