[GCC-XML] Nested template class not declared?
Wesley Tansey
tansey at vt.edu
Fri Mar 30 19:29:33 EDT 2007
Sorry, to clarify: I mean it does not output fields for the classes
A<int> nor A<double>.
Wesley Tansey
Graduate Student
Department of Computer Science
Virginia Tech
http://people.cs.vt.edu/~tansey/
Wesley Tansey wrote:
> Hi Brad,
>
> Sorry to have missed the notice. I downloaded and ran the CVS build,
> and it does output the A<int> class from my example, but it doesn't
> output the fields for single nor combo.
>
>
> Wesley
>
> Brad King wrote:
>> Wesley Tansey wrote:
>>
>>> I'm using the 0.6.0 release and VC 7.1 to parse the code.
>> ^^^^^
>> Please see the giant capital letter bold statement here:
>>
>> http://www.gccxml.org/HTML/Download.html
>>
>> -Brad
>>
>
>
>> 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?
>>
>>
>>
>
> _______________________________________________
> gccxml mailing list
> gccxml at gccxml.org
> http://www.gccxml.org/mailman/listinfo/gccxml
>
More information about the gccxml
mailing list