[GCC-XML] detection of templeted member function inside template class ?

Brad King brad.king at kitware.com
Thu Aug 14 11:16:24 EDT 2008


Damien Fagnou wrote:
> I am trying to use gccxml on the OpenEXR Libraries .
> its an heavily templated project and in case like :
> 
> template <class T> class Matrix44
> {
>  public:
> 
>    T x[4][4];
> 
>    // this is not
>    template <class S>
>    const Matrix44 &    setAxisAngle (const Vec3<S>& ax, S ang);
> 
>    /// this is seen by gccxml
>    const Matrix44 &    setScale (T s);
> }
> 
> 
> I make sure that Matrix44<float > is instanciate doing
> sizeof(Matrix44<float >) somewhere in my code .
> 
> I also make sure I use the template member function :
> 
> Matrix44<float > myMat;
> myMat.setAxisAngle( Imath::V3f(1.0,0.0,0.0) , 20.0  );
> 
> but nothing does it ,
> 
> setScale is in the xml output but not setAxisAngle.

Unfortunately this is a case that I've never been able to solve in the
gccxml dump implementation.  It works for members of class templates,
and for member templates of non-template classes.  It does not work for
member templates within class templates.  I have simply been unable to
discover the incantation inside GCC's source code to get a reference to
such instantiations.  The class template instantiation lists the member
template, but the member template does not list its instantiations.

If you want to try to fix it, I can get you started.

-Brad




More information about the gccxml mailing list