repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR c++/85765 - SFINAE and non-type default template arg.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
cpp0x
/
decltype47.C
blob
f6700a33cdd15f142b0ad3096585756a29bcd5b0
1
// PR c++/55564
2
// { dg-do compile { target c++11 } }
3
4
template <typename T, decltype(sizeof(T)) N>
5
auto array_size(T(&)[N]) -> decltype(N) { return N; }
6
7
int main() {
8
int simple[4] = {};
9
int result = array_size(simple);
10
11
return result;
12
}