RE: [ROOT] Re: rootcint and vector<pair<> >

From: Rene Brun (Rene.Brun@cern.ch)
Date: Wed Dec 19 2001 - 23:17:00 MET


Hi Richard,
Thanks for reporting the problem and Philippe for fixint it.
Now in CVS.

Rene Brun

On Wed, 19 Dec 2001, Philippe Canal wrote:

> Hi Richard,
> 
> > This also suggests it's a separate problem from the one brought up in
> > August (though perhaps related), which had to do with a declaration of 
> >    map<int, pair < const int , const SomeClass* > > fPairListMap;
> 
> Thank you for remind us of this problem.  This is now fixed and should
> appear in the cvs repository shortly.
> 
> Cheers,
> Philippe.
> 
> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Richard S. Holmes
> Sent: Wednesday, December 19, 2001 2:36 PM
> To: roottalk@pcroot.cern.ch
> Subject: [ROOT] Re: rootcint and vector<pair<> >
> 
> 
> "Richard S. Holmes" wrote:
> > Specifically, if I have a class
> > header containing
> > 
> >   vector<pair<Int_t,double> >* Bar() const;
> > 
> > rootcint fails with error
> > 
> >     Error: No symbol pair<int in current scope
> > FILE:/cern/root/cint/lib/prec_stl/vector LINE:105
> > 
> > Similar errors occur if Bar returns vector<pair<WHATEVER,double> >*
> > where WHATEVER is bool, bool*, unsigned, int, double, or Double_t.
> > Curiously enough, rootcint does NOT throw an error if WHATEVER is
> > Bool_t, Bool_t*, UInt_t, or size_t.
> 
> On further investigation I realized the difference is that the types
> that succeed are resolved (by CINT?) into two symbols and the ones that
> fail are resolved to a single symbol.  That is:
> 
> Types that fail: Int_t (resolves to int), Double_t (resolves to double),
> bool, bool*, unsigned, int, double (resolve to themselves).
> 
> Types that succeed: Bool_t (resolves to unsigned char), Bool_t*
> (resolves to unsigned char*), UInt_t (resolves to unsigned int), or
> size_t (resolves to unsigned int).
> 
> This looks like a parser bug... is it?
> 
> This also suggests it's a separate problem from the one brought up in
> August (though perhaps related), which had to do with a declaration of 
> 
>     map<int, pair < const int , const SomeClass* > > fPairListMap;
> 
> giving errors while
> 
>     typedef const SomeClass cSomeClass;
>     ...
>     map<int, pair < const int , cSomeClass* > > fPairListMap;
> 
> didn't.
> 
> -- 
> Richard S. Holmes, Research Assistant Professor
> Physics Department, Syracuse University
> Syracuse, NY 13244
> (315) 443-5977
> 



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:12 MET