aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/ptrmem8.C
blob: c0a1fa3a1caa668a13656ba585092ff3c9d55dc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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" }
}