[GCC-XML] typenames of template classes with typedef'd template parameters

Stefan Roiser stefan.roiser at cern.ch
Thu May 18 09:23:36 EDT 2006


Hi,

parsing the following example with gccxml

template <typename T> class Foo { T t; };

typedef int MyInt;
Foo<MyInt> f;

will return for the class name "Foo<int>" and the type of the data  
member "t" the typedef "MyInt". Would it be possible to also retain  
the information about the typedef'd template argument in the class  
name (maybe as some extra attribute)?

Cheers

	Stefan

<snip>

   <FundamentalType id="_4" name="int" size="32" align="32"/>
   <Typedef id="_5" name="MyInt" type="_4" context="_1"  
location="f0:6" file="f0" line="6"/>
   <Class id="_6" name="Foo<int>" context="_1"  
mangled="3FooIiE" demangled="Foo<int>" location="f0:2"  
file="f0" line="2" artificial="1" size="32" align="32" members="_117  
_118 _119 " bases=""/>

[...]

   <Field id="_117" name="t" type="_5" offset="0" context="_6"  
access="private" mangled="_ZN3FooIiE1tE"  
demangled="Foo<int>::t" location="f0:3" file="f0" line="3"/>

</snip>

-- 
Stefan Roiser
CERN, PH Department
CH - 1211 Geneva 23
Mob:+41 76 487 5334
Tel:+41 22 767 4838
Fax:+41 22 766 9119





More information about the gccxml mailing list