@@ -70,6 +70,17 @@ struct ExternalUnionMembers {
70
70
// (private to the implementation)
71
71
using Info = ExternalUnionImpl::MembersHelper<Members...>;
72
72
73
+ enum : bool {
74
+ is_copy_constructible = Info::is_copy_constructible,
75
+ is_nothrow_copy_constructible = Info::is_nothrow_copy_constructible,
76
+ is_move_constructible = Info::is_move_constructible,
77
+ is_nothrow_move_constructible = Info::is_nothrow_move_constructible,
78
+ is_copy_assignable = Info::is_copy_assignable,
79
+ is_nothrow_copy_assignable = Info::is_nothrow_copy_assignable,
80
+ is_move_assignable = Info::is_move_assignable,
81
+ is_nothrow_move_assignable = Info::is_nothrow_move_assignable,
82
+ };
83
+
73
84
// / The type of indices into the union member type list.
74
85
enum Index : unsigned {};
75
86
@@ -429,7 +440,15 @@ namespace ExternalUnionImpl {
429
440
template <>
430
441
struct MembersHelper <> {
431
442
enum : bool {
432
- is_trivially_copyable = true
443
+ is_trivially_copyable = true ,
444
+ is_copy_constructible = true ,
445
+ is_nothrow_copy_constructible = true ,
446
+ is_move_constructible = true ,
447
+ is_nothrow_move_constructible = true ,
448
+ is_copy_assignable = true ,
449
+ is_nothrow_copy_assignable = true ,
450
+ is_move_assignable = true ,
451
+ is_nothrow_move_assignable = true ,
433
452
};
434
453
435
454
enum : size_t {
@@ -476,7 +495,32 @@ struct MembersHelper<H, T...> {
476
495
public:
477
496
enum : bool {
478
497
is_trivially_copyable =
479
- Member::is_trivially_copyable && Others::is_trivially_copyable
498
+ Member::is_trivially_copyable &&
499
+ Others::is_trivially_copyable,
500
+ is_copy_constructible =
501
+ Member::is_copy_constructible &&
502
+ Others::is_copy_constructible,
503
+ is_nothrow_copy_constructible =
504
+ Member::is_nothrow_copy_constructible &&
505
+ Others::is_nothrow_copy_constructible,
506
+ is_move_constructible =
507
+ Member::is_move_constructible &&
508
+ Others::is_move_constructible,
509
+ is_nothrow_move_constructible =
510
+ Member::is_nothrow_move_constructible &&
511
+ Others::is_nothrow_move_constructible,
512
+ is_copy_assignable =
513
+ Member::is_copy_assignable &&
514
+ Others::is_copy_assignable,
515
+ is_nothrow_copy_assignable =
516
+ Member::is_nothrow_copy_assignable &&
517
+ Others::is_nothrow_copy_assignable,
518
+ is_move_assignable =
519
+ Member::is_move_assignable &&
520
+ Others::is_move_assignable,
521
+ is_nothrow_move_assignable =
522
+ Member::is_nothrow_move_assignable &&
523
+ Others::is_nothrow_move_assignable,
480
524
};
481
525
482
526
enum : size_t {
@@ -536,7 +580,19 @@ struct MembersHelper<H, T...> {
536
580
template <class T >
537
581
struct UnionMemberInfo {
538
582
enum : bool {
539
- is_trivially_copyable = IsTriviallyCopyable<T>::value
583
+ is_trivially_copyable = IsTriviallyCopyable<T>::value,
584
+ is_copy_constructible = std::is_copy_constructible<T>::value,
585
+ is_nothrow_copy_constructible =
586
+ std::is_nothrow_copy_constructible<T>::value,
587
+ is_move_constructible = std::is_move_constructible<T>::value,
588
+ is_nothrow_move_constructible =
589
+ std::is_nothrow_move_constructible<T>::value,
590
+ is_copy_assignable = std::is_copy_assignable<T>::value,
591
+ is_nothrow_copy_assignable =
592
+ std::is_nothrow_copy_assignable<T>::value,
593
+ is_move_assignable = std::is_move_assignable<T>::value,
594
+ is_nothrow_move_assignable =
595
+ std::is_nothrow_move_assignable<T>::value,
540
596
};
541
597
542
598
enum : size_t {
@@ -575,7 +631,15 @@ struct UnionMemberInfo {
575
631
template <>
576
632
struct UnionMemberInfo <void > {
577
633
enum : bool {
578
- is_trivially_copyable = true
634
+ is_trivially_copyable = true ,
635
+ is_copy_constructible = true ,
636
+ is_nothrow_copy_constructible = true ,
637
+ is_move_constructible = true ,
638
+ is_nothrow_move_constructible = true ,
639
+ is_copy_assignable = true ,
640
+ is_nothrow_copy_assignable = true ,
641
+ is_move_assignable = true ,
642
+ is_nothrow_move_assignable = true ,
579
643
};
580
644
581
645
enum : size_t {
0 commit comments