summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/overload/copy1.C
blob: f0ec385fc9cb1d0781f9eddc918c7f270a350dd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/34824

struct A;

struct B
{
  B (A const &);		// { dg-message "note" }
  B (B &);			// { dg-message "note" }
};

struct A
{
  A (B);			// { dg-error "initializing" }
};

B
f (B const& b)
{
  return b;			// { dg-error "matching" "matching" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 19 }
}