Data.DefaultedMoveAssignmentIsDeleted = Record[Idx++];
Data.DefaultedDestructorIsDeleted = Record[Idx++];
Data.HasTrivialSpecialMembers = Record[Idx++];
+ Data.DeclaredNonTrivialSpecialMembers = Record[Idx++];
Data.HasIrrelevantDestructor = Record[Idx++];
Data.HasConstexprNonCopyMoveConstructor = Record[Idx++];
Data.DefaultedDefaultConstructorIsConstexpr = Record[Idx++];
Record.push_back(Data.DefaultedMoveAssignmentIsDeleted);
Record.push_back(Data.DefaultedDestructorIsDeleted);
Record.push_back(Data.HasTrivialSpecialMembers);
+ Record.push_back(Data.DeclaredNonTrivialSpecialMembers);
Record.push_back(Data.HasIrrelevantDestructor);
Record.push_back(Data.HasConstexprNonCopyMoveConstructor);
Record.push_back(Data.DefaultedDefaultConstructorIsConstexpr);
friend void friend_2(HasFriends);
void private_thing();
};
+
+struct HasNontrivialDefaultConstructor {
+ HasNontrivialDefaultConstructor() = default;
+ HasNontrivialDefaultConstructor(int n = 0);
+
+ // Ensure this class is not POD but is still trivially-copyable.
+ // This is necessary to exercise the second static_assert below,
+ // because GCC's spec for __has_trivial_constructor is absurd.
+ int m;
+private:
+ int n;
+};
+
+static_assert(!__is_trivial(HasNontrivialDefaultConstructor), "");
+static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor), "");
friend_1(s);
friend_2(s);
}
+
+static_assert(!__is_trivial(HasNontrivialDefaultConstructor), "");
+static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor), "");