summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/template/ptrmem2.C
blob: 1919047360a3ac6134ac01bcff7c7a2f541d1cb0 (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-message "note" }

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