Home | History | Annotate | Download | only in tests
      1 // Simple smoke test to see that the demangler is actually working
      2 
      3 namespace abc {
      4 template <typename T1, typename T2>
      5 class def {
      6   public:
      7     T1 xyzzy(T1 *p, T2 *)
      8     {
      9       return *p ? 10 : 20;
     10     }
     11   };
     12 };
     13 
     14 template <typename T>
     15 class magic {
     16 public:
     17   T xyzzy(T *p)
     18   {
     19     return (new abc::def<int,typeof(*this)>)->xyzzy(p, 0);
     20   }
     21 };
     22 
     23 int main()
     24 {
     25    magic<int> *c = new magic<int>;
     26 
     27    c->xyzzy(new int);
     28    return 0;
     29 }
     30