Add 469782 to NEWS
[valgrind.git] / memcheck / tests / demangle.cpp
blob9922bf405f2b39c4b121490e76bcb68618492f14
1 // Simple smoke test to see that the demangler is actually working
2 #include <cstdlib>
4 namespace abc {
5 template <typename T1, typename T2>
6 class def {
7 public:
8 T1 xyzzy(T1 *p, T2 *)
10 free(p);
11 return 10;
16 template <typename T>
17 class magic {
18 public:
19 T xyzzy(T *p)
21 return (new abc::def<int,typeof(*this)>)->xyzzy(p, 0);
25 int main()
27 magic<int> *c = new magic<int>;
29 c->xyzzy(new int);
30 return 0;