PR c++/10126
* g++.dg/template/ptrmem8.C: New test.
From-SVN: r74185
+2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ PR c++/10126\r
+ * g++.dg/template/ptrmem8.C: New test.
+
2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/12573\r
--- /dev/null
+// { dg-do compile }
+// Origin: <marco dot franzen at bigfoot dot com>
+// PR c++/10126: Handle ptmf default conversions while matching a template
+// argument
+
+struct B
+{
+ int I () const;
+ int I ();
+};
+
+struct D : B {};
+
+template <int (D::*fun)() const> int Get();
+
+int main ()
+{
+ Get<&B::I>(); // { dg-error "no matching function" }
+ Get<&D::I>(); // { dg-error "no matching function" }
+}