[GCC-XML] Incomplete instantiated template class in xml

Andrej Mitrovic andrej.mitrovich at gmail.com
Tue Sep 4 19:37:26 EDT 2012


Hello,

Why are template instances exported in xml as incomplete types? For example:

struct Class { };

template <class T>
class List
{
public:
    List();
    void foo();
};

typedef List<Class *> ClassList;
static ClassList* classListVar;

in xml the ClassList type is:
<Class id="_84" name="List<Class*>" context="_1" incomplete="1"
mangled="4ListIP5ClassE" demangled="List<Class*>"
location="f1:10" file="f1" line="10" artificial="1" align="8"/>

There are no members, only the incomplete tag. The template is
instantiated so I was expecting to get a list of members just like the
FAQ says:

"Why don't I see templates in the output?
This feature has not been implemented because the driving project for
which GCC-XML was written had no need for uninstantiated templates.
Template >instantiations< will still be dumped, though."

I'm not interested in types used to instantiate the template but I do
need the class members though.



More information about the gccxml mailing list