[GCC-XML]Explicit template instantiation

Brad King brad.king at kitware.com
Tue Feb 18 09:45:34 EST 2003

>   I have a question concerning template instantiation. I would like to
> generate the information of templated classes, and this works well if
> the templated type is used in another classes. I was expecting to see
> the same when doing an explicit template instantiation in the form:
> struct B {}
> template std::vector<B>;
>   In the output of gccxml there is no reference to vector<B>. Is there
> any way to force it?

This should work, but you need proper syntax:

struct B {};
template class std::vector<B>;

Note that in the XML, the class name will appear as

vector<B,allocator<B> >


More information about the gccxml mailing list