Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.dg
/
eh
/
ref-temp2.C
blob: 0c718962d4982d2cefcb261dffc0e23ee8d5777a [
file
] [
log
] [
blame
]
// { dg-do run { target c++11 } }
struct
B
{
B
()
{}
~
B
()
noexcept
(
false
)
{
throw
42
;
}
};
int
a
;
struct
A
{
A
()
{
++
a
;
};
A
(
B
)
{
++
a
;
}
~
A
()
{
--
a
;
}
};
using
Arr
=
A
[
3
];
int
main
()
{
try
{
auto
&&
ref
=
Arr
{
B
()};
}
catch
(...)
{
}
return
a
;
}