summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/defaulted28.C
blob: 451a1b4198f5baf64b57a0dd90aab11e573d2447 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// PR c++/49102
// PR c++/50034
// { dg-do compile { target c++11 } }

struct A {
  A() = default;

private:
  A(A const&) = default;	// { dg-message "private" }
};

int f(...) { }
int main() {
  A a;
  f(a); 			// { dg-error "this context" }
  sizeof(f(a));			// OK because unevaluated
}