On Fri, Oct 19, 2012 at 8:48 PM, boba2001 <span dir="ltr"><<a href="mailto:asasasdd@mail.ru" target="_blank">asasasdd@mail.ru</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello all!<br>
<br>
I use RecursiveASTVisitor to pass over the top level declarations.<br>
I determined the VisitDecl method in class derived from RecursiveASTVisitor<br>
as:<br>
bool MyASTVisitor::VisitDecl (Decl * D){<br>
        D -> dump();<br>
}<br>
<br>
I use the test example:<br>
--- 1.cpp ---<br>
template <class T> void templ_a(T x){<br>
        int b = 123;<br>
}<br>
<br>
int main(){<br>
        int a = 123;<br>
        templ_a<int>(a);<br>
        return 0;<br>
}<br>
------------<br>
<br>
My question is: why does template function have the form:<br>
void templ_a(T x) {<br>
    int b = 123;<br>
}<br>
<br>
That is lost "template <class T> ". How can I get the declaration with<br>
"template <class T>"?<br></blockquote><div><br></div><div>The question is: why do you need it? dump() is as far as I understand considered a debugging aid,  not a (for some definition correct) pretty-printer.</div>
<div><br></div><div>Cheers,</div><div>/Manuel</div></div></div>