Tdatime.h

Hi,

I have recently switched root versions from 3.02/07 to 3.10/02. When compiling a file that includes tdatime.h I recieve several error messages:

On closer inspection I see that there are some operators at the bottom of tdatime.h which are causing the problem:

inline Bool_t operator==(const TDatime &d1, const TDatime &d2)
   { return d1.fDatime == d2.fDatime; }
inline Bool_t operator!=(const TDatime &d1, const TDatime &d2)
   { return d1.fDatime != d2.fDatime; }
inline Bool_t operator< (const TDatime &d1, const TDatime &d2)
   { return d1.fDatime < d2.fDatime; }
inline Bool_t operator<=(const TDatime &d1, const TDatime &d2)
   { return d1.fDatime <= d2.fDatime; }
inline Bool_t operator> (const TDatime &d1, const TDatime &d2)
   { return d1.fDatime > d2.fDatime; }
inline Bool_t operator>=(const TDatime &d1, const TDatime &d2)
   { return d1.fDatime >= d2.fDatime; }

Since I’m not using these I have commented them out. Is this a known problem? The operators appear to be outside the class but are trying to access protected data members of the class. Perhaps some methods to get the needed values are needed?

Thanks and Best Regards,

Will

P.S. I’m using MS VC++6.0 to compile the code.

Hi Will
Service Pack 5 must help.
microsoft.com/ntserver/nts/d … allsp5.asp

Regards. Valeriy

Hi Valeriy,

I have patched my copy of VC++ 6.0 up to service pack 5 and the problem goes away. Thanks,

Will