]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/39987 (Rejects default argument that is a template via access failure)
authorDodji Seketeli <dodji@gcc.gnu.org>
Fri, 7 Aug 2009 13:13:12 +0000 (15:13 +0200)
committerDodji Seketeli <dodji@gcc.gnu.org>
Fri, 7 Aug 2009 13:13:12 +0000 (15:13 +0200)
2009-08-07  Dodji Seketeli  <dodji@redhat.com>

PR c++/39987
* gcc/testsuite/g++.dg/overload/defarg4.C: Oops, forgot to add
the testcase.

From-SVN: r150568

gcc/testsuite/g++.dg/overload/defarg4.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/overload/defarg4.C b/gcc/testsuite/g++.dg/overload/defarg4.C
new file mode 100644 (file)
index 0000000..198f9b2
--- /dev/null
@@ -0,0 +1,26 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin PR c++/39987
+// { dg-do "compile" }
+
+class foo
+{
+ template<typename U>
+ static bool func(const U& x)
+ {}
+public:
+ template<typename U>
+ unsigned int Find(const U& x, bool (*pFunc) (const U&) = func) const
+ {}
+};
+
+class bar {
+ bool Initialize();
+protected:
+ foo b;
+};
+
+bool bar::Initialize()
+{
+        b.Find(b);
+}
+