aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/template/ptrmem2.C
blob: 5f03580c1b20cb69f756435452334e4ad67bcb7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// { dg-do compile }

// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 31 Dec 2001 <nathan@codesourcery.com>

// We'd tsubst a pointer to member reference

struct A {};

template <typename T> T A::* Foo (); // { dg-error "reference" }

void Baz ()
{
  Foo <int &> (); // { dg-error "no matching function" "" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 14 }
}