2 friend void friend_1(HasFriends
);
3 friend void friend_2(HasFriends
);
7 struct HasNontrivialDefaultConstructor
{
8 HasNontrivialDefaultConstructor() = default;
9 HasNontrivialDefaultConstructor(int n
= 0);
11 // Ensure this class is not POD but is still trivially-copyable.
12 // This is necessary to exercise the second static_assert below,
13 // because GCC's spec for __has_trivial_constructor is absurd.
19 static_assert(!__is_trivial(HasNontrivialDefaultConstructor
), "");
20 static_assert(!__has_trivial_constructor(HasNontrivialDefaultConstructor
), "");
22 void *operator new[](__SIZE_TYPE__
);
24 extern int mergeUsedFlag
;
25 inline int getMergeUsedFlag() { return mergeUsedFlag
; }
32 struct HasVirtualFunctions
{
35 struct OverridesVirtualFunctions
: HasVirtualFunctions
{
38 extern "C" void ExternCFunction();
45 auto name_for_linkage2_inner_a
= NameForLinkage2::Inner();
46 typedef decltype(name_for_linkage2_inner_a
) NameForLinkage2Inner
;
48 namespace Aliased
{ extern int a
; }
49 namespace Alias
= Aliased
;
51 struct InhCtorA
{ InhCtorA(int); };
52 struct InhCtorB
: InhCtorA
{ using InhCtorA::InhCtorA
; };
54 struct ClassWithVBases
: HasFriends
, virtual HasNontrivialDefaultConstructor
{
57 struct ClassWithVBases
;