[GCC-XML]Explicit template instantiation

Pere Mato Vila Pere.Mato at cern.ch
Wed Feb 19 04:24:05 EST 2003


> > C:\type test.h
> > #include <vector>
> > template class std::vector<double>;
> >
> > C:\gccxml -fxml=test.xml test.h
> 
> Try writing the code in test.cxx.  The internals of GCC-XML 
> invoke the gcc
> c++ parser executable, which may not identify a .h file as 
> C++.  If the 
> c++ .h
> is included in another C++ file, then it should work fine:
> 
> foo.cxx:
> #include "test.h"
> 
> gccxml -fxml=test.xml foo.cxx
> 

 I tried with different platforms/compiler combinations and I didn't
notice any dependency with the file suffix.
 - With Linux RH 7.3 and gcc-2.95.2 it works. But, the class
vector<double> in not in the std namespace.
 - With Linux RH 7.3 and gcc-3.2 it does not generate the class
information for vector<double> but it generates other classes involving
this one like __normal_iterator<A*,std::vector<A, std::allocator<A> > > 
 - With Windows and VC 6.0 it does not work.


			Pere



More information about the gccxml mailing list