[GCC-XML]Explicit template instantiation

Pere Mato Vila Pere.Mato at cern.ch
Tue Feb 18 10:36:04 EST 2003

> 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> >

 Hummm, I do not understand. It does not work for me. I do the following
commands on Windows:

C:\gccxml --version
GCC-XML version 0.4.0

C:\type test.h
#include <vector>
template class std::vector<double>;

C:\gccxml -fxml=test.xml test.h

C:\find "Class" test.xml

---------- TEST.XML
  <Class id="_323" name="exception" context="_1" location="f7:50"
members="_539 _540 _541 _542 _543
_544 _545 _546 " bases=""/>
  <Class id="_456" name="type_info" context="_565" incomplete="1"
  <Class id="_535" name="bad_alloc" context="_565" location="f6:16"/>
  <Class id="_537" name="bad_exception" context="_565"
  <Class id="_466" name="logic_error" context="_565" location="f2:17"/>
  <Class id="_465" name="domain_error" context="_565" location="f2:32"/>
  <Class id="_464" name="invalid_argument" context="_565"
  <Class id="_463" name="length_error" context="_565" location="f2:54"/>
  <Class id="_462" name="out_of_range" context="_565" location="f2:65"/>
  <Class id="_461" name="runtime_error" context="_565"
  <Class id="_460" name="overflow_error" context="_565"
  <Class id="_459" name="underflow_error" context="_565"
  <Class id="_458" name="range_error" context="_565" location="f2:113"/>
  <Class id="_454" name="__fundamental_type_info" context="_589"
incomplete="1" location="f12:3"/>
  <Class id="_453" name="__array_type_info" context="_589"
incomplete="1" location="f0:59"/>
  <Class id="_452" name="__function_type_info" context="_589"
incomplete="1" location="f0:59"/>
  <Class id="_451" name="__enum_type_info" context="_589" incomplete="1"
  <Class id="_450" name="__class_type_info" context="_589"
incomplete="1" location="f0:59"/>
  <Class id="_449" name="__si_class_type_info" context="_589"
incomplete="1" location="f0:59"/>
  <Class id="_448" name="__pointer_type_info" context="_589"
incomplete="1" location="f0:59"/>
  <Class id="_447" name="__pointer_to_member_type_info" context="_589"
incomplete="1" location="f0:5

More information about the gccxml mailing list