summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/conversion/memfn2.C
blob: c3d76133dbd46613e246ad67636db81d5d9cc103 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/37646

struct A
{
  void foo();

  void bar(int i)
  {
    void (*p)() = i ? foo : foo; // { dg-error "invalid use of member" }
  }
};