1 // RUN: %clang_cc1 -std=c++11 -verify %s
2 struct A
{ // expected-note 2{{candidate}}
3 A(int); // expected-note {{candidate}}
6 int a
= A().n
; // expected-error {{no matching constructor}}
9 B() = delete; // expected-note 4{{here}}
12 int b
= B().n
; // expected-error {{call to deleted}}
15 B b
; // expected-note {{deleted default constructor}}
17 int c
= C().b
.n
; // expected-error {{call to implicitly-deleted default}}
20 D() = default; // expected-note {{here}} expected-warning {{implicitly deleted}}
21 B b
; // expected-note 2{{'b' has a deleted default constructor}}
23 int d
= D().b
.n
; // expected-error {{call to implicitly-deleted default}}
38 F f
; // expected-note {{non-trivial default constructor}}
40 int g
= G().f
.n
; // expected-error {{call to implicitly-deleted default}}
45 H(); // expected-note {{here}}
47 int h
= H().n
; // expected-error {{private constructor}}
50 H h
; // expected-note {{inaccessible default constructor}}
52 int i
= I().h
.n
; // expected-error {{call to implicitly-deleted default}}
60 int j2
= J().f(); // ok
63 J j
; // expected-note 2{{non-trivial default constructor}}
66 int k1
= K().j
.n
; // expected-error {{call to implicitly-deleted default}}
67 int k2
= K().j
.f(); // expected-error {{call to implicitly-deleted default}}