<div dir="ltr"><div>I'm not sure if this is the right mailing list for this sort of question, but I couldn't think of a better one. Would it be possible to parse a C++ file using clang, and perform a source-to-source transformation replacing all templates with resolved instances of that template? Something like transforming</div>
<div><br></div><div> template<class T></div><div> struct A {</div><div> T val;</div><div> };</div><div><br></div><div> A<int> x;</div><div> A<double> y;</div><div><br></div><div>into</div>
<div><br></div><div> struct A_int {</div><div> int val;</div><div> };</div><div> struct A_double {</div><div> double val;</div><div> };</div><div><br></div><div> A_int x;</div><div> A_double y;</div>
<div><br></div><div>- Leszek</div>
</div>