Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.dg
/
template
/
array36.C
blob: 1511da7020d8fa01a37586413a90d2a55b69f935 [
file
] [
log
] [
blame
]
// Don't try to deduce array bounds from a dependent initializer.
// { dg-do compile { target c++11 } }
struct
A
{
int
i
,
j
;
};
template
<
class
T
>
void
f
(
T t
)
{
A ar
[]
=
{
t
,
t
};
static_assert
(
sizeof
(
ar
)/
sizeof
(
A
)
==
1
,
""
);
}
int
main
()
{
f
(
42
);
}