Hello All,
I've run into a problem with ROOT 4.00.08 being used with GCC 3.3.6 in a corner case of the handling of templates. I'm sorry, but I haven't checked in later versions.
The problem seems to originate from how ROOTCINT handles sub-classes defined inside of a template. I've attached a short example.
In the example, the CINT dictionary was generated using:
rootcint -f THandle_Dict.cxx -c -p THandle.hxx THandle_LinkDef.h
The problematic line is in THandle_Dict.cxx:
static int G__THandle_Dict_143_2_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) {
G__letint(result7,85,(long)((const THandle<TObject>*)(G__getstructoffset()))->operator Tester*()); return(1 || funcname || hash || result7 || libp) ; }
I believe the correct code is:
static int G__THandle_Dict_143_2_0(G__value *result7,G__CONST char *funcname,struct G__param *libp,int hash) {
G__letint(result7,85,(long)((const THandle<TObject>*)(G__getstructoffset()))->operator THandle<TObject>::Tester*()); return(1 || funcname || hash || result7 || libp) ; }
Thanks,
Clark
-- Clark McGrew Univ. at Stony Brook, Physics and AstronomyReceived on Sat Jul 02 2005 - 18:50:17 MEST
<clark.mcgrew_at_stonybrook.edu> 631-632-8299
#ifndef THandle_hxx_seen #define THandle_hxx_seen #include <TObject.h> template <class T> class THandle { public: THandle() { } virtual ~THandle() {} private: class Tester { void operator delete(void*); public: void bogo() {} }; public: //********************** CAUSES THE BUG ************** operator Tester*() const { static Tester test; return &test; } ClassDefT(THandle,1); }; ClassDefT2(THandle,T); #endif
- text/x-chdr attachment: THandle_LinkDef.h__charset_ISO-8859-1
- text/x-c++src attachment: THandle_Dict.cxx__charset_ISO-8859-1
- text/x-chdr attachment: THandle_Dict.h__charset_ISO-8859-1
This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:10 MET