@@ -70,6 +70,17 @@ struct ExternalUnionMembers {
7070 // (private to the implementation)
7171 using Info = ExternalUnionImpl::MembersHelper<Members...>;
7272
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+
7384 // / The type of indices into the union member type list.
7485 enum Index : unsigned {};
7586
@@ -429,7 +440,15 @@ namespace ExternalUnionImpl {
429440template <>
430441struct MembersHelper <> {
431442 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 ,
433452 };
434453
435454 enum : size_t {
@@ -476,7 +495,32 @@ struct MembersHelper<H, T...> {
476495public:
477496 enum : bool {
478497 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,
480524 };
481525
482526 enum : size_t {
@@ -536,7 +580,19 @@ struct MembersHelper<H, T...> {
536580template <class T >
537581struct UnionMemberInfo {
538582 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,
540596 };
541597
542598 enum : size_t {
@@ -575,7 +631,15 @@ struct UnionMemberInfo {
575631template <>
576632struct UnionMemberInfo <void > {
577633 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 ,
579643 };
580644
581645 enum : size_t {
0 commit comments