aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/overload/defarg3.C
blob: 83ee111f15e514196ca47dea430efb1eefa527f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/37391
// { dg-do compile }

class C {
private:
  static int f(int); // { dg-error "private" }
  static int f(char);
};

class D {
public:
  /* C::f is inaccessible, so this is an error, even if this function
     is never called.  */
  static void g(int (*)(int) = C::f); // { dg-error "context" }
};