Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
template
/
dtor5.C
blob: d9a1c692a34cd618572f4f31af528de0baaa99fc [
file
] [
log
] [
blame
]
// PR c++/23287
template
<
class
T
>
struct
A
{
int
i
;
~
A
();
};
template
<
class
T
>
void
f
(
A
<
T
>
*
ap
)
{
ap
->~
A
();
}
template
<
class
T
>
void
g
(
A
<
T
>
*
ap
)
{
ap
->~
B
();
// { dg-error "" }
}
int
main
()
{
f
(
new
A
<int>
);
g
(
new
A
<int>
);
}