Re: [ROOT] [roottalk] typedef problems w/ rootcint

From: Fons Rademakers (Fons.Rademakers@cern.ch)
Date: Tue Mar 30 2004 - 04:21:57 MEST


Hi Matevz,

  Fix now in cvs.

Cheers, Fons.


On Mon, 2004-03-29 at 13:32, Matevz Tadel wrote:
> Hi,
> 
> The following construct in a header file causes rootcint to die of 
> errors (4.00/03, gcc-3.3.2 FC1):
> 
> #include <list>
> using namespace std;
> typedef std::list<int**>		lppI_t;
> typedef std::list<int**>::iterator	lppI_i;
> 
> The error output is attached (together with linkdef and header file).
> 
> After playing around for some time, i noticed that adding two 
> 'typename's to  cint/lib/prec_stl/memory fixes the problem.
> The patch is also attached, but i'm not competent on the matter and the 
> fix is most likely a crappy one.
> 
> Cheers,
> matevz
> 
> 
> 
> 
> 
> 
> ______________________________________________________________________
> 
> Generating dictionary for Safr
> rootcint -f Safr_Dict.cc -c Safr.h Safr_LinkDef.h
> cint internal limitation in cint/src/typedef.c 977
> cint internal limitation in cint/src/typedef.c 977
> Syntax error FILE:prec_stl/memory LINE:52
> Syntax error FILE:prec_stl/memory LINE:56
> Syntax error FILE:prec_stl/memory LINE:57
> Limitation: reference or pointer type not handled properly FILE:prec_stl/list LINE:48
> Limitation: reference or pointer type not handled properly FILE:prec_stl/list LINE:49
> Warning: Error occured during reading source files
> Warning: Error occured during dictionary source generation
> !!!Removing Safr_Dict.cc Safr_Dict.h !!!
> Error: rootcint: error loading headers...
> make: *** [Safr_Dict.cc] Error 1
> 
> ______________________________________________________________________
> 
> #include <TObject.h>
> #include <TMatrixF.h>
> 
> #include <list>
> 
> using namespace std;
> 
> typedef std::list<int**>		lppI_t;
> typedef std::list<int**>::iterator	lppI_i;
> 
> class Safr : public TMatrixF {
>  public:
>   Safr() : TMatrixF(5,5) {}
> 
>   ClassDef(Safr, 1)
> };
> 
> ______________________________________________________________________
> 
> #pragma link off all functions;
> #pragma link off all globals;
> #pragma link off all classes;
> 
> #pragma link C++ class Safr+;
> 
> ______________________________________________________________________
> 
> Common subdirectories: root.403.src.orig/cint/lib/prec_stl/CVS and root.403.src/cint/lib/prec_stl/CVS
> diff -u root.403.src.orig/cint/lib/prec_stl/memory root.403.src/cint/lib/prec_stl/memory
> --- root.403.src.orig/cint/lib/prec_stl/memory	2004-02-09 22:11:17.000000000 +0100
> +++ root.403.src/cint/lib/prec_stl/memory	2004-03-25 13:26:31.000000000 +0100
> @@ -26,8 +26,8 @@
>  public:
>    typedef size_t     size_type;
>    typedef ptrdiff_t  difference_type;
> -  typedef _Tp*       pointer;
> -  typedef const _Tp* const_pointer;
> +  typedef typename _Tp *      pointer;
> +  typedef const typename  _Tp * const_pointer;
>    typedef _Tp&       reference;
>    typedef const _Tp& const_reference;
>    typedef _Tp        value_type;
-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
WWW:    http://www.rademakers.org/fons/      Fax:   +41 22 7679480



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:07 MET