summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp2a/aggr1.C
blob: ea599237ab18cd38013568cf35beebc887f5ca38 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// { dg-do compile { target c++11 } }
struct A {
  A () = delete;	// { dg-message "declared here" "" { target c++20 } }
};
struct B {
  B () = default;
  int b = 0;
};
struct C {
  C (C&&) = default;	// { dg-message "candidate" "" { target c++20 } }
  int c, d;
};
A a {};			// { dg-error "use of deleted function" "" { target c++20 } }
B b = {1};		// { dg-error "could not convert" "" { target { c++11_only || c++20 } } }
C *c = new C {2, 3};	// { dg-error "no matching function for call to" "" { target c++20 } }