CXXMethodDecl :: getNameAsString for class class constructor or destructor

I am writing a small C ++ software with libtooling to translate C ++ headers into C ++ skeleton files.

It works fine for a class without a template, but I have a problem with template classes, especially with a class class constructor or destructor.

I use CXXMethodDecl::getNameAsStringto get the function name. For a class without a template such as

  struct C
  {
    C();
    ~C();   
    //other stuff
  }

The previous function gives me (as I expect) Cand ~C.

But if the class is a template as follows:

  template <class TT,int N> 
  struct C
  {
    C();
    ~C();
   }

: C<TT, N> ~C<TT, N>, . , . , ( ).

- ? ?

+3

All Articles