1 | // RUN: %clang_cc1 -std=c++11 -verify %s |
---|---|
2 | |
3 | struct NotAggregateBase {}; |
4 | |
5 | struct A : NotAggregateBase { |
6 | private: |
7 | A() = default; // expected-note {{here}} |
8 | }; |
9 | A a = {}; // expected-error {{calling a private constructor}} |
10 | |
11 | struct B : NotAggregateBase { |
12 | explicit B() = default; // expected-note {{here}} |
13 | }; |
14 | B b = {}; // expected-error {{chosen constructor is explicit}} |
15 | B b2{}; |
16 | B b3; |
17 |