Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / overload / defarg4.C
blob198f9b28f322582beb5b765c6628249776c7be31
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin PR c++/39987
3 // { dg-do "compile" }
5 class foo
7  template<typename U>
8  static bool func(const U& x)
9  {}
10 public:
11  template<typename U>
12  unsigned int Find(const U& x, bool (*pFunc) (const U&) = func) const
13  {}
16 class bar {
17  bool Initialize();
18 protected:
19  foo b;
22 bool bar::Initialize()
24         b.Find(b);