summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.pt/array1.C
blob: 50e3724b72b0b84bf77ac75a77c25d93b453b7dd (plain)
1
2
3
4
5
6
7
8
9
10
11
// { dg-do run  }
template <class T, unsigned N>
  unsigned size(T (&)[N]) { return N; }
template <class T, unsigned N>
  unsigned size(T const (&)[N]) { return N; }

int main() {
  short iarray[] = { 1, 2, 3, 4, 5 };
  const short carray[] = { 1, 2, 3, 4, 5 };
  return size(iarray) - size(carray);
}