Sign in
gnu
/
gcc
/
cd2fd5facb5e1882d3f338ed456ae9536f7c0593
/
.
/
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
;
}