[ROOT] Rootcint barfage

From: Conrad Steenberg (conrad@hep.caltech.edu)
Date: Wed Oct 16 2002 - 17:41:53 MEST


Hi

I have a simple class that rootcint seems to have trouble with when
creating a dictionary file:

class TFileInfo : public TObject {
public:
  const TString name;
  const Int_t mode;
  const Int_t size;
  const Int_t mtime;
  
  TFileInfo();
  TFileInfo(const char *my_name, const Int_t my_mode, const Int_t my_size, const Int_t my_mtime):
  name(my_name),
  mode(my_mode),
  size(my_size),
  mtime(my_mtime)
  {}
  virtual ~TFileInfo();
  ClassDef (TFileInfo, 1) 
};

The error message is:

webfiledict.C: In method `void TFileInfo::Streamer (TBuffer &)':
webfiledict.C:471: passing `const TString' as `this' argument of `void 
TString::Streamer (TBuffer &)' discards qualifiers
webfiledict.C:472: could not convert `TString(this->TFileInfo::mode)' 
to `TString &'
/opt/root/include/TString.h:349: in passing argument 2 of `operator>> 
(TBuffer &, TString &)'
webfiledict.C:473: could not convert `TString(this->TFileInfo::size)' 
to `TString &'
/opt/root/include/TString.h:349: in passing argument 2 of `operator>> 
(TBuffer &, TString &)'
webfiledict.C:474: could not convert `TString(this->TFileInfo::mtime)' 
to `TString &'
/opt/root/include/TString.h:349: in passing argument 2 of `operator>> 
(TBuffer &, TString &)'
webfiledict.C:479: passing `const TString' as `this' argument of `void 
TString::Streamer (TBuffer &)' discards qualifiers
webfiledict.C: In method `void TFileInfo::ShowMembers (TMemberInspector 
&, char *)':
webfiledict.C:496: passing `const TString' as `this' argument of `void 
TString::ShowMembers (TMemberInspector &, char *)' discards qualifiers

If I remove the const qualifiers the dictionary compiles fine.

Regards

Conrad

-- 
*-----------------------------------------*
| Conrad Steenberg                        |
| Caltech, Mail Code 356-48               |
| Pasadena, CA, 91125                     |
| e-mail: conrad@hep.caltech.edu          |
| Tel: (626) 395-8758                     |
*-----------------------------------------*



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:14 MET