[ROOT] Templates and ClassDefT

From: Michael Bussmann (Michael.Bussmann@Physik.uni-muenchen.de)
Date: Sat Nov 03 2001 - 16:35:44 MET


Hi there,

Here's a little problem with templates in ROOT I couldn't fix myself.

I've got some class

template <class P1> class TA

and one which inherits from this one

template <class P1, class P2> class TB: public TA<P1> {

  private:
    TA<P2>* fA;
...

where this doesn't seem to work:

  ClassDefT(TB<P1,P2>,1)
}
ClassDef2T2(TB, P1, P2)

where I get the error message
macro `ClassDefT' used with too many (3) args

Neither does this work:

  ClassDef(TB<P1,P2>,1)
}
ClassDef2T2(TB, P1, P2)

My source file looks like this in the start

ClassImp2T(TB, P1, P2)

template TB<Int_t,Int_t>;

This all should work well according to
http://root.cern.ch/cgi-bin/print_hit_bold.pl/root/roottalk/roottalk01/3364.html
but unfortunately it doesn't. What am I doing wrong???

cheers, Michael



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:06 MET