Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/template/deduce1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // { dg-do run } |
2 | |
3 // Copyright (C) 2002 Free Software Foundation, Inc. | |
4 // Contributed by Nathan Sidwell 13 Sep 2002 <nathan@codesourcery.com> | |
5 | |
6 template <typename T> int Foo (T const *) | |
7 { | |
8 return 1; | |
9 } | |
10 template <typename T> int Foo (T const &) | |
11 { | |
12 return 2; | |
13 } | |
14 template <typename T, __SIZE_TYPE__ I> int Foo (T const (&ref)[I]) | |
15 { | |
16 return 0; | |
17 } | |
18 | |
19 int main () | |
20 { | |
21 static int array[4] = {}; | |
22 | |
23 return Foo (array); | |
24 } | |
25 |