summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/defaulted14.C
blob: 235e646780a94e295dbbe5a8bf89b9476e0dfd97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// PR c++/39866
// { dg-options "-std=c++0x" }

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" }
  a = 1.0;		// { dg-error "ambiguous" }
}