@@ -192,36 +192,24 @@ namespace cwg1658 { // cwg1658: 5
192
192
struct E : A { E(); virtual void foo () = 0; }; // #cwg1658-E1
193
193
E::E () = default ; // #cwg1658-E1-ctor
194
194
// cxx98-error@-1 {{defaulted function definitions are a C++11 extension}}
195
- // cxx98-error@-2 {{base class 'A' has private default constructor}}
196
- // cxx98-note@-3 {{in defaulted default constructor for 'cwg1658::DefCtor::E' first required here}}
197
- // cxx98-note@#cwg1658-A1 {{implicitly declared private here}}
198
- // since-cxx11-error@#cwg1658-E1-ctor {{defaulting this default constructor would delete it after its first declaration}}
199
- // since-cxx11-note@#cwg1658-E1 {{default constructor of 'E' is implicitly deleted because base class 'A' has an inaccessible default constructor}}
195
+ // expected-error@#cwg1658-E1-ctor {{defaulting this default constructor would delete it after its first declaration}}
196
+ // expected-note@#cwg1658-E1 {{default constructor of 'E' is implicitly deleted because base class 'A' has an inaccessible default constructor}}
200
197
struct F : virtual A { F(); }; // #cwg1658-F1
201
198
F::F () = default ; // #cwg1658-F1-ctor
202
199
// cxx98-error@-1 {{defaulted function definitions are a C++11 extension}}
203
- // cxx98-error@-2 {{inherited virtual base class 'A' has private default constructor}}
204
- // cxx98-note@-3 {{in defaulted default constructor for 'cwg1658::DefCtor::F' first required here}}
205
- // cxx98-note@#cwg1658-A1 {{implicitly declared private here}}
206
- // since-cxx11-error@#cwg1658-F1-ctor {{defaulting this default constructor would delete it after its first declaration}}
207
- // since-cxx11-note@#cwg1658-F1 {{default constructor of 'F' is implicitly deleted because base class 'A' has an inaccessible default constructor}}
200
+ // expected-error@#cwg1658-F1-ctor {{defaulting this default constructor would delete it after its first declaration}}
201
+ // expected-note@#cwg1658-F1 {{default constructor of 'F' is implicitly deleted because base class 'A' has an inaccessible default constructor}}
208
202
209
203
struct G : B { G(); virtual void foo () = 0; }; // #cwg1658-G1
210
204
G::G () = default ; // #cwg1658-G1-ctor
211
205
// cxx98-error@-1 {{defaulted function definitions are a C++11 extension}}
212
- // cxx98-error@#cwg1658-G1 {{base class 'B' has private destructor}}
213
- // cxx98-note@#cwg1658-G1-ctor {{in defaulted default constructor for 'cwg1658::DefCtor::G' first required here}}
214
- // cxx98-note@#cwg1658-B1 {{implicitly declared private here}}
215
- // since-cxx11-error@#cwg1658-G1-ctor {{defaulting this default constructor would delete it after its first declaration}}
216
- // since-cxx11-note@#cwg1658-G1 {{default constructor of 'G' is implicitly deleted because base class 'B' has an inaccessible destructor}}
206
+ // expected-error@#cwg1658-G1-ctor {{defaulting this default constructor would delete it after its first declaration}}
207
+ // expected-note@#cwg1658-G1 {{default constructor of 'G' is implicitly deleted because base class 'B' has an inaccessible destructor}}
217
208
struct H : virtual B { H(); }; // #cwg1658-H1
218
209
H::H () = default ; // #cwg1658-H1-ctor
219
210
// cxx98-error@-1 {{defaulted function definitions are a C++11 extension}}
220
- // cxx98-error@#cwg1658-H1 {{base class 'B' has private destructor}}
221
- // cxx98-note@#cwg1658-H1-ctor {{in defaulted default constructor for 'cwg1658::DefCtor::H' first required here}}
222
- // cxx98-note@#cwg1658-B1 {{implicitly declared private here}}
223
- // since-cxx11-error@#cwg1658-H1-ctor {{defaulting this default constructor would delete it after its first declaration}}
224
- // since-cxx11-note@#cwg1658-H1 {{default constructor of 'H' is implicitly deleted because base class 'B' has an inaccessible destructor}}
211
+ // expected-error@#cwg1658-H1-ctor {{defaulting this default constructor would delete it after its first declaration}}
212
+ // expected-note@#cwg1658-H1 {{default constructor of 'H' is implicitly deleted because base class 'B' has an inaccessible destructor}}
225
213
}
226
214
227
215
namespace Dtor {
@@ -234,19 +222,13 @@ namespace cwg1658 { // cwg1658: 5
234
222
struct G : B { ~G (); virtual void foo () = 0; }; // #cwg1658-G2
235
223
G::~G () = default ; // #cwg1658-G2-dtor
236
224
// cxx98-error@-1 {{defaulted function definitions are a C++11 extension}}
237
- // cxx98-error@#cwg1658-G2 {{base class 'B' has private destructor}}
238
- // cxx98-note@#cwg1658-G2-dtor {{in defaulted destructor for 'cwg1658::Dtor::G' first required here}}
239
- // cxx98-note@#cwg1658-B2 {{implicitly declared private here}}
240
- // since-cxx11-error@#cwg1658-G2-dtor {{defaulting this destructor would delete it after its first declaration}}
241
- // since-cxx11-note@#cwg1658-G2 {{destructor of 'G' is implicitly deleted because base class 'B' has an inaccessible destructor}}
225
+ // expected-error@#cwg1658-G2-dtor {{defaulting this destructor would delete it after its first declaration}}
226
+ // expected-note@#cwg1658-G2 {{destructor of 'G' is implicitly deleted because base class 'B' has an inaccessible destructor}}
242
227
struct H : virtual B { ~H (); }; // #cwg1658-H2
243
228
H::~H () = default ; // #cwg1658-H2-dtor
244
229
// cxx98-error@-1 {{defaulted function definitions are a C++11 extension}}
245
- // cxx98-error@#cwg1658-H2 {{base class 'B' has private destructor}}
246
- // cxx98-note@#cwg1658-H2-dtor {{in defaulted destructor for 'cwg1658::Dtor::H' first required here}}
247
- // cxx98-note@#cwg1658-B2 {{implicitly declared private here}}
248
- // since-cxx11-error@#cwg1658-H2-dtor {{defaulting this destructor would delete it after its first declaration}}
249
- // since-cxx11-note@#cwg1658-H2 {{destructor of 'H' is implicitly deleted because base class 'B' has an inaccessible destructor}}
230
+ // expected-error@#cwg1658-H2-dtor {{defaulting this destructor would delete it after its first declaration}}
231
+ // expected-note@#cwg1658-H2 {{destructor of 'H' is implicitly deleted because base class 'B' has an inaccessible destructor}}
250
232
}
251
233
252
234
namespace MemInit {
@@ -291,36 +273,24 @@ namespace cwg1658 { // cwg1658: 5
291
273
// cxx98-error@-1 {{rvalue references are a C++11 extension}}
292
274
E::E (const E&) = default ; // #cwg1658-E5-copy-ctor
293
275
// cxx98-error@-1 {{defaulted function definitions are a C++11 extension}}
294
- // cxx98-error@-2 {{base class 'A' has private copy constructor}}
295
- // cxx98-note@-3 {{in defaulted copy constructor for 'cwg1658::CopyCtor::E' first required here}}
296
- // cxx98-note@#cwg1658-A5 {{implicitly declared private here}}
297
- // since-cxx11-error@#cwg1658-E5-copy-ctor {{defaulting this copy constructor would delete it after its first declaration}}
298
- // since-cxx11-note@#cwg1658-E5 {{copy constructor of 'E' is implicitly deleted because base class 'A' has an inaccessible copy constructor}}
276
+ // expected-error@#cwg1658-E5-copy-ctor {{defaulting this copy constructor would delete it after its first declaration}}
277
+ // expected-note@#cwg1658-E5 {{copy constructor of 'E' is implicitly deleted because base class 'A' has an inaccessible copy constructor}}
299
278
E::E (E&&) = default ; // #cwg1658-E5-move-ctor
300
279
// cxx98-error@-1 {{rvalue references are a C++11 extension}}
301
280
// cxx98-error@-2 {{defaulted function definitions are a C++11 extension}}
302
- // cxx98-error@-3 {{base class 'A' has private move constructor}}
303
- // cxx98-note@-4 {{in defaulted move constructor for 'cwg1658::CopyCtor::E' first required here}}
304
- // cxx98-note@#cwg1658-A5 {{implicitly declared private here}}
305
- // since-cxx11-error@#cwg1658-E5-move-ctor {{defaulting this move constructor would delete it after its first declaration}}
306
- // since-cxx11-note@#cwg1658-E5 {{move constructor of 'E' is implicitly deleted because base class 'A' has an inaccessible move constructor}}
281
+ // expected-error@#cwg1658-E5-move-ctor {{defaulting this move constructor would delete it after its first declaration}}
282
+ // expected-note@#cwg1658-E5 {{move constructor of 'E' is implicitly deleted because base class 'A' has an inaccessible move constructor}}
307
283
struct F : virtual A { F(const F&); F(F&&); }; // #cwg1658-F5
308
284
// cxx98-error@-1 {{rvalue references are a C++11 extension}}
309
285
F::F (const F&) = default ; // #cwg1658-F5-copy-ctor
310
286
// cxx98-error@-1 {{defaulted function definitions are a C++11 extension}}
311
- // cxx98-error@-2 {{inherited virtual base class 'A' has private copy constructor}}
312
- // cxx98-note@-3 {{in defaulted copy constructor for 'cwg1658::CopyCtor::F' first required here}}
313
- // cxx98-note@#cwg1658-A5 {{implicitly declared private here}}
314
- // since-cxx11-error@#cwg1658-F5-copy-ctor {{defaulting this copy constructor would delete it after its first declaration}}
315
- // since-cxx11-note@#cwg1658-F5 {{copy constructor of 'F' is implicitly deleted because base class 'A' has an inaccessible copy constructor}}
287
+ // expected-error@#cwg1658-F5-copy-ctor {{defaulting this copy constructor would delete it after its first declaration}}
288
+ // expected-note@#cwg1658-F5 {{copy constructor of 'F' is implicitly deleted because base class 'A' has an inaccessible copy constructor}}
316
289
F::F (F&&) = default ; // #cwg1658-F5-move-ctor
317
290
// cxx98-error@-1 {{rvalue references are a C++11 extension}}
318
291
// cxx98-error@-2 {{defaulted function definitions are a C++11 extension}}
319
- // cxx98-error@-3 {{inherited virtual base class 'A' has private move constructor}}
320
- // cxx98-note@-4 {{in defaulted move constructor for 'cwg1658::CopyCtor::F' first required here}}
321
- // cxx98-note@#cwg1658-A5 {{implicitly declared private here}}
322
- // since-cxx11-error@#cwg1658-F5-move-ctor {{defaulting this move constructor would delete it after its first declaration}}
323
- // since-cxx11-note@#cwg1658-F5 {{move constructor of 'F' is implicitly deleted because base class 'A' has an inaccessible move constructor}}
292
+ // expected-error@#cwg1658-F5-move-ctor {{defaulting this move constructor would delete it after its first declaration}}
293
+ // expected-note@#cwg1658-F5 {{move constructor of 'F' is implicitly deleted because base class 'A' has an inaccessible move constructor}}
324
294
}
325
295
326
296
// assignment case is superseded by cwg2180
0 commit comments