Sign in
gnu
/
gcc
/
1f16a020acbea0af26209478990b83b1a1ba3a2b
/
.
/
gcc
/
testsuite
/
g++.dg
/
ext
/
desig6.C
blob: f71d6eeecd564a95de4f379e57de504ce45c2f89 [
file
] [
log
] [
blame
]
// PR c++/57041
// { dg-do compile { target c++11 } }
// { dg-options "" }
template
<
typename
T
>
union
u
{
T a
;
char
b
;
};
template
<
typename
T
>
u
<
T
>
make_u
(
T t
)
{
return
{
.
a
=
t
};
}
int
main
()
{
return
make_u
<int>
(
1
).
a
;
}