summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/dcl.decl/dcl.init/p7.cpp
blob: 1c1d793e8a5e6aa64f0361fc2218b41931b86e24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: %clang_cc1 -std=c++11 -verify %s

struct NotAggregateBase {};

struct A : NotAggregateBase {
private:
  A() = default; // expected-note {{here}}
};
A a = {}; // expected-error {{calling a private constructor}}

struct B : NotAggregateBase {
  explicit B() = default; // expected-note {{here}}
};
B b = {}; // expected-error {{chosen constructor is explicit}}
B b2{};
B b3;
OpenPOWER on IntegriCloud