@@ -295,6 +295,53 @@ testTWS(Arithmetic value, const wchar_t* wstr_expected = L"", bool test_expected
295
295
}
296
296
}
297
297
298
+ // done
299
+ static
300
+ void
301
+ testTypeTraits ()
302
+ {
303
+ {
304
+ using S = static_string<0 >;
305
+ static_assert (std::is_trivially_copyable<S>::value, " " );
306
+ static_assert (!std::is_trivially_default_constructible<S>::value, " " );
307
+ static_assert (std::is_trivially_copy_constructible<S>::value, " " );
308
+ static_assert (std::is_trivially_move_constructible<S>::value, " " );
309
+ static_assert (std::is_trivially_copy_assignable<S>::value, " " );
310
+ static_assert (std::is_trivially_move_assignable<S>::value, " " );
311
+ static_assert (std::is_trivially_destructible<S>::value, " " );
312
+ }
313
+ {
314
+ using S = static_string<1 >;
315
+ static_assert (std::is_trivially_copyable<S>::value, " " );
316
+ static_assert (!std::is_trivially_default_constructible<S>::value, " " );
317
+ static_assert (std::is_trivially_copy_constructible<S>::value, " " );
318
+ static_assert (std::is_trivially_move_constructible<S>::value, " " );
319
+ static_assert (std::is_trivially_copy_assignable<S>::value, " " );
320
+ static_assert (std::is_trivially_move_assignable<S>::value, " " );
321
+ static_assert (std::is_trivially_destructible<S>::value, " " );
322
+ }
323
+ {
324
+ using S = static_string<20 >;
325
+ static_assert (std::is_trivially_copyable<S>::value, " " );
326
+ static_assert (!std::is_trivially_default_constructible<S>::value, " " );
327
+ static_assert (std::is_trivially_copy_constructible<S>::value, " " );
328
+ static_assert (std::is_trivially_move_constructible<S>::value, " " );
329
+ static_assert (std::is_trivially_copy_assignable<S>::value, " " );
330
+ static_assert (std::is_trivially_move_assignable<S>::value, " " );
331
+ static_assert (std::is_trivially_destructible<S>::value, " " );
332
+ }
333
+ {
334
+ using S = static_string<400 >;
335
+ static_assert (std::is_trivially_copyable<S>::value, " " );
336
+ static_assert (!std::is_trivially_default_constructible<S>::value, " " );
337
+ static_assert (std::is_trivially_copy_constructible<S>::value, " " );
338
+ static_assert (std::is_trivially_move_constructible<S>::value, " " );
339
+ static_assert (std::is_trivially_copy_assignable<S>::value, " " );
340
+ static_assert (std::is_trivially_move_assignable<S>::value, " " );
341
+ static_assert (std::is_trivially_destructible<S>::value, " " );
342
+ }
343
+ }
344
+
298
345
// done
299
346
static
300
347
void
@@ -7461,6 +7508,8 @@ runTests()
7461
7508
constexpr auto cxper = testConstantEvaluation ();
7462
7509
static_cast <void >(cxper);
7463
7510
7511
+ testTypeTraits ();
7512
+
7464
7513
testConstruct ();
7465
7514
7466
7515
testAssignment ();
0 commit comments