summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/ptrmem20.C
blob: dee3c629a70dc32cac17e5a98032c516b004fd9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/43079

struct A {};

struct B
{
  void foo() const;
  void foo();
};

template<void (A::*)()> void bar(); // { dg-message "note" }

void baz()
{
  bar<&B::foo>();  // { dg-error "not a valid template argument|no match" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 15 }
}