summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/koenig8.C
blob: 5a49a7066daa186615c92756f7c0878e4830d3b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/40740

template<class T>
T addsome(T v) {
  return v+1;
}

int addsome(int v) {
  return v+2;
}

int main() {
  int i = 0;
  if (addsome(i) != 2)
    return 1;
  if (addsome<>(i) != 1)
    return 2;
  return 0;
}