Hi,

First off, let me just say that I LOVE this tool! I spent 2 weeks trying to hack an ANTLR C++ grammar to do XML output before I found this tool, so you guys have been a huge life saver already.

I am writing a tool which requires seeing the template parameters of an STL map class. I've written my own parsing code to get the parameters recursively (i.e. there may be a map which has a map as a key). However, in trying this example, I have discovered that if you have a templated class as a parameter to the inner map, the templated class seems to never be recognized, even though it should be since it's certainly a variable in the map. The following is an example program:

#include <map>
#include <vector>

template <typename T>
class A
{
   T my_t;
};

class B
{
   std::map<std::map<A<int>, int>, std::vector<double> > combo;
   std::map<A<double>, int> single;
};

int main(){return 0;}

Here, combo is a map which uses a map as a key, and the inner map uses A<int> as its key. However, the XML file produced by GCC-XML doesn't contain a class definition for A<int> (though it does contain one for A<double>). I'm using the 0.6.0 release and VC 7.1 to parse the code. Is this just not possible with this version of GCC-XML or is it maybe because I'm using VC?

Sincerely,
Wesley Tansey
Graduate Student
Department of Computer Science
Virginia Tech
http://people.cs.vt.edu/~tansey/


_______________________________________________
gccxml mailing list
[email protected]
http://www.gccxml.org/mailman/listinfo/gccxml

Reply via email to