aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/overload/addr3.C
blob: b203326de3216cdc65517189d9def639a611e469 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// PR c++/115430
// { dg-do compile }

template<typename T>
int Func(T);
typedef int (*funcptrtype)(int);
funcptrtype fp0 = &Func<int>;
funcptrtype fp1 = +&Func<int>;
funcptrtype fp2 = (0, &Func<int>);
funcptrtype fp3 = (0, +&Func<int>);
funcptrtype fp4 = (0, 1, &Func<int>);

template<typename T>
void
g ()
{
  funcptrtype fp5 = (0, &Func<T>);
}

void
f ()
{
  g<int>();
}