RE: [ROOT] Templated constructors and assigment operators of template class

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue May 18 2004 - 20:49:14 MEST


I am just stating to look at it.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Troy D. Straszheim
Sent: Tuesday, May 18, 2004 11:52 AM
To: roottalk@pcroot.cern.ch
Subject: Re: [ROOT] Templated constructors and assigment operators of
template class


 
Hi roottalk-

I am unable to instrument a templated constructor in a *template*
class, and I am unable to instrument functions and/or operators that
return a reference to an object of that classes' type, unless that
reference is hidden in a typedef.

For instance:

template <class T>
class A {
public:

  template <class U>
    A(const U&); // rootcint doesnt find this

  typedef A& reference;

  template <class U>
  reference operator=(const U&); // rootcint finds this version ok

  template <class U>
  A& operator=(const U&);  // it can't find this version

}

Thanks for any hints you might have,

Troy Straszheim



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