8 enum E
{ red
, green
, blue
, yellow
};
9 struct S
{ int x
, y
; S
* s
; };
12 struct emptyDerived
: S
{ };
13 struct emptyNested
: emptyBase
{ };
14 struct emptyVBase
{ virtual ~emptyVBase(){} };
15 struct emptyVDerived
: S
{ virtual ~emptyVDerived(){} };
16 struct emptyVNested
: emptyVBase
{ };
30 typedef void (*PtrFunc
)(E
*, char);
37 int operator()(const QString
& x
, int& y
) const;
38 operator const char*() { return 0; }
56 void Banong() { g(); }
58 void g() { Banong(); }
60 void Aanong() { B::g(); }
62 void g() { Aanong(); }
65 void f(E e
[3], char c
)
77 memset(buffer
, 1, 300);
78 for (int i
= 0; i
< sizeof(buffer
); i
+=15) buffer
[i
] = '\02';
92 void strtest(const char* t
)
98 std::cout
<< s2
<< std::endl
;
102 void templated_strtest(F f
, const char* t
)
112 int main(int argc
, char* argv
[])
115 if (*argv
[1] == 's') {
117 } else if (*argv
[1] == 'a') {
118 // let debugger attach
124 char a
[6] = { 'a', 'B', '\'', '\"' };
125 char a1
[1] = { '1' };
126 E e
[3] = { red
, green
, blue
};
127 E e1
[1] = { yellow
};
130 void (*pf
[2])(E
*, char) = {f
};
132 double d
[1] = { -1.234e123
};
140 s
= "Hi, there!\r\n\t\"\'\\";
142 const QString
& strref
= s
;
144 templated_strtest(strtest
, s
);
145 s
= "asbcxxxxxxxxxxxxxxxxxxxxxxxxxxx";
147 s
+= "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiii";
151 s
= "xxxxxxxxxxxxxxxxxxxxxxxxxxx";
169 std::cout
<< l
<< std::endl
;
193 int Dl::operator()(const QString
& x
, int& y
) const
195 std::cerr
<< "ha! I know!" << std::endl
;
199 Dl::operator PtrFunc
*()