[ROOT] rootcint problem

From: Roger Moore (rwmoore@fnal.gov)
Date: Fri Sep 13 2002 - 00:30:16 MEST


I've run into a problem with rootcint and template functions with ROOT
3.03/05. The problem exists when the template function uses a typename
defined inside the template argument. For example the function:

 template <class VALUE>
    LeCut<VALUE> operator<=(const VALUE&, const VALUE&);

works fine but the moment that I change this to:

 template <class VALUE>
    LeCut<VALUE> operator<=(const VALUE&, const VALUE::value_type &);

rootcint gets very unhappy and generates the errors:

Error: class,struct,union or type VALUE not defined  FILE:LeCut.hpp LINE:96
Error: class,struct,union or type VALUE not defined  FILE:LeCut.hpp LINE:96
Internal error: global function template arg type FILE:LeCut.hpp LINE:96

It seems that rootcint does not wait until the function template is
instantiated before trying to look up 'VALUE::value_type' and since it
obviously can't do this until it is instantiated, and VALUE is defined, it
produces an error.

I'm presuming that this is a bug?

Roger



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