Hi, > When I try to read it back in with a macro, though, I get Limitation: Can't instantiate precompiled template vector<int,allocator<int> > FILE:doit.C LINE:11 This should NOT be happening if you loaded your library. If you did NOT load you library (and hence got a bunch of message of missing dictionary for BaseLeft, BaseRight, etc.), this is normal and should be fixed in 4.00/01. Cheers, Philippe. -----Original Message----- From: owner-roottalk@pcroot.cern.ch [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Troy Straszheim Sent: Sunday, January 25, 2004 3:28 PM To: roottalk@pcroot.cern.ch Subject: [ROOT] Limitation: cannot instantiate precompiled template ..... Greetings roottalk -- Thanks a million for the hint on plotting an stl vector. It works like a charm, has helped a lot. I'm still working on building the most generic interface possible between our internals and ROOT, and I have started to get an intermittent error which I think may pop up only when I instantiate templates in certain ways. I have two base classes: class BaseLeft { vector<int> v; } and class BaseRight { vector<int> v; } and then a child class that inherits from both class Child : public BaseLeft, public BaseRight { vector<float>, etc }; which also contains a vector of ints, a vector of floats and some other stuff. No vectors of vectors or anything like that. This class "Child", is given as the argument to a template class that inherits from TObject: template <class T> RootContainer : public TObject { ... }; and in my RootContainerLinkDef.h I have all the instantiations #pragma link C++ class RootContainer<Child>+; #pragma link C++ class Child+; and then the others, in order, are BaseLeft, BaseRight, vector<int>, and vector<float>. I branch the Child inside the RootContainer and write it to a TTree inside a TFile: works fine. When I try to read it back in with a macro, though, I get Limitation: Can't instantiate precompiled template vector<int,allocator<int> > FILE:doit.C LINE:11 The strange thing is that this worked a minute ago, and I cannot figure out what I have changed. Any hints? I am thinking that it may have something to do with the order of the pragmas in RootContainerLinkDef.h. How does root handle precompiled and non-precompiled templates? Best, Troy Straszheim
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:05 MET