summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/overload/defarg3.C
blob: 6622e430a61524df40fdbf274d387e9543626719 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// PR c++/37971
// { 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" }
};