repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Add 469782 to NEWS
[valgrind.git]
/
memcheck
/
tests
/
demangle.cpp
blob
9922bf405f2b39c4b121490e76bcb68618492f14
1
// Simple smoke test to see that the demangler is actually working
2
#include <cstdlib>
3
4
namespace
abc
{
5
template
<
typename T1
,
typename T2
>
6
class
def
{
7
public
:
8
T1
xyzzy
(
T1
*
p
,
T2
*)
9
{
10
free
(
p
);
11
return
10
;
12
}
13
};
14
};
15
16
template
<
typename T
>
17
class
magic
{
18
public
:
19
T
xyzzy
(
T
*
p
)
20
{
21
return
(
new
abc
::
def
<
int
,
typeof
(*
this
)>)->
xyzzy
(
p
,
0
);
22
}
23
};
24
25
int
main
()
26
{
27
magic
<
int
> *
c
=
new
magic
<
int
>;
28
29
c
->
xyzzy
(
new
int
);
30
return
0
;
31
}