mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-19 21:10:45 +08:00
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:
parent
59e7a90194
commit
1c59130c86
@ -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
|
||||
|
20
gcc/testsuite/g++.dg/template/ptrmem8.C
Normal file
20
gcc/testsuite/g++.dg/template/ptrmem8.C
Normal 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" }
|
||||
}
|
Loading…
Reference in New Issue
Block a user