aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/defaulted14.C
blob: 0c07fa701b735c54753ad9ededead583a1e7657f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// PR c++/39866
// { dg-do compile { target c++11 } }

struct A {
  A& operator=(const A&) = delete; // { dg-bogus "" }

  void operator=(int) {}	// { dg-message "" }
  void operator=(char) {}	// { dg-message "" }
};

struct B {};

int main()
{
  A a;
  a = B();		// { dg-error "no match" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 16 }
  a = 1.0;		// { dg-error "ambiguous" }
  // { dg-message "candidate" "candidate note" { target *-*-* } 18 }
}