summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/pmf-1.C
blob: 3dd01c6b90f3d3588e2cffd7168c192448a5ee9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// C++ PR/2521
// Copyright (C) 2002 Free Software Foundation
// Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>

// { dg-do compile }

struct A 
{
  void f();
  void foo(void (A::*)(int));       // { dg-message "void A::foo|no known conversion" "" }
  template<typename T>
    void g(T);
  void h()
  {
    void (A::*p)() = &A::f;
    void (A::*q)() = &(A::f);       // { dg-error "parenthesized" "" }
    foo(&g<int>);                   // { dg-error "no matching" "" }
    // { dg-message "candidate" "candidate note" { target *-*-* } 17 }
  }
};