Hi Roger, At the CINT level, all the STL are (currently) pulled in the global scope and define as such. You example works if you do: root [1] UnaryRootFunction<list<PhysicsObject *> *> m2(mysize); Cheers, Philippe -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Roger Moore Sent: Tuesday, December 17, 2002 5:19 PM To: roottalk@pcroot.cern.ch Subject: [ROOT] Instaniating precompiled template error When attempting to instantiate a template class on the ROOT command line that I have previously declared in a linkdef file I get the following error: root [1] UnaryRootFunction<std::list<PhysicsObject *> *> m2(mysize); Limitation: Can't instantiate precompiled template list<PhysicsObject*,std::allocator<PhysicsObject*> > FILE:/tmp/fileW19RCl_cint LINE:1 *** Interpreter error recovered *** I can instantiate "UnaryRootFunction<PhysicsObject *> m1(myfunc)". Both template instanace are declared in the same linkdef file (and corresponding loaded, shared library). I have also declared: #pragma link C++ class std::list<PhysicsObject *>+; and I can correctly instantiate objects like: std::list<PhysicsObject *> l; Is there any reason that I cannot have a template instance as a template parameter? I've tried typedef-ing and making dummy classes to try and hide the fact from CINT (since obviously the compiler can handle it) but to no avail. The version of ROOT that I am using is 3.03/09. Roger
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:24 MET