Sign in
gnu
/
gcc
/
ab810952eb7c061e37054ddd1dfe0aa033365131
/
.
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
decltype47.C
blob: f6700a33cdd15f142b0ad3096585756a29bcd5b0 [
file
] [
log
] [
blame
]
// PR c++/55564
// { dg-do compile { target c++11 } }
template
<
typename
T
,
decltype
(
sizeof
(
T
))
N
>
auto
array_size
(
T
(&)[
N
])
->
decltype
(
N
)
{
return
N
;
}
int
main
()
{
int
simple
[
4
]
=
{};
int
result
=
array_size
(
simple
);
return
result
;
}