1 // This file test stack parsing capabilities of KDbg.
2 // Parsing function names can be quite tricky ;)
9 cout
<< __PRETTY_FUNCTION__
<< endl
;
17 cout
<< __PRETTY_FUNCTION__
<< endl
;
21 cout
<< __PRETTY_FUNCTION__
<< endl
;
33 cout
<< __PRETTY_FUNCTION__
<< endl
;
36 void Banong() { g(); }
38 void g() { Banong(); }
40 void Aanong() { B::g(); }
42 void g() { Aanong(); }
44 void operator<<(int, S
)
46 cout
<< __PRETTY_FUNCTION__
<< endl
;
52 cout
<< __PRETTY_FUNCTION__
<< endl
;
56 void operator<<(struct S
&, int)
58 cout
<< __PRETTY_FUNCTION__
<< endl
;
61 template<typename T
, typename U
>
62 void operator<<(T
&, U
)
64 cout
<< __PRETTY_FUNCTION__
<< endl
;
67 void operator<(struct S
&, int)
69 cout
<< __PRETTY_FUNCTION__
<< endl
;
72 template<typename T
, typename U
>
75 cout
<< __PRETTY_FUNCTION__
<< endl
;
85 void indirect(T f
, const char* s
)
90 template<class... Args
>
91 void varargs(const char* sep
, Args
&&... args
)
93 long vals
[] = { args
... };
108 A::operator<<(1, s1
);
111 // the next lines test a templated function that accepts
112 // as one of its parameters a templated function pointer
113 void (*op1
)(S
&, S
*) = operator<<;
115 void (*op2
)(S
&, S
*) = operator<;
117 indirect(f
, "indirect");
119 // pointer to member function
120 void (S::*pm1
)(int) = &S::operator>>;
122 void (templS
<int>::*pm2
)(int) = &templS
<int>::operator>;
127 varargs(" : ", 1, short(-2), 4U, '3');