re PR c++/10126 (ICE in convert_nontype_argument on using overload resolution in template args)

PR c++/10126
	* g++.dg/template/ptrmem8.C: New test.

From-SVN: r74185
This commit is contained in:
Giovanni Bajo 2003-12-02 15:50:44 +00:00
parent 59e7a90194
commit 1c59130c86
2 changed files with 25 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/10126
* g++.dg/template/ptrmem8.C: New test.
2003-12-02 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/12573

View File

@ -0,0 +1,20 @@
// { 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" }
}