Florian Krohm 84e3e486d3 Change the testcase to not depend on the type of 'this' in the output.
GCC 4.9.2 and GCC 4.8.x have different opinions about that variable's type.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14780
2014-11-24 22:30:49 +00:00

30 lines
435 B
C++

// Simple smoke test to see that the demangler is actually working
namespace abc {
template <typename T1, typename T2>
class def {
public:
T1 xyzzy(T1 *p, T2 *)
{
return *p ? 10 : 20;
}
};
};
template <typename T>
class magic {
public:
T xyzzy(T *p)
{
return (new abc::def<int,typeof(*this)>)->xyzzy(p, 0);
}
};
int main()
{
magic<int> *c = new magic<int>;
c->xyzzy(new int);
return 0;
}