memfunc template

From: Masaharu Goto (MXJ02154@nifty.ne.jp)
Date: Mon Feb 07 2000 - 22:26:37 MET


Hello George,

It was nice to meeting you at ROOT workshop. 

About auto_ptr and member function template, I made some progress.
As far as the class template is interpreted and the member function 
templates are described within the template class definition, cint
now correctly instantiates member function templates. There are 2 
member function templates in auto_ptr. Cint5.14.31 can interpret this.

  template<class X>
  class auto_ptr {
   public:
    template<class Y> auto_ptr(const auto_ptr<Y>& y) { ... }
    template<class Y> auto_ptr& operator=(const auto_ptr<Y>& y) { ... }
  };


Now, if I understand correctly, you want to use precompiled auto_ptr
and instantiate member function template afterwards, which means member
function template is interpreted. Looking at the auto_ptr definition, I
could not think of ways to do so. Problems are

  1. Cint needs to know what member function template to instantiated 
    within which precompiled class scope. This functionality is currently
    not there. I want to make sure that there is no showstopper
    before start coding.
  2. It looks like there is an inevitable need for private member access.
    You need to refer to owns flag and set ptr member. There is no public
    interface to do so.
  3. It is quite difficult, if not impossible, to interpret a constructor
    for a precompiled class. 

Well, maybe I need to examine your sample source code before going too far.
I hope we can find some workaround.

Thank you
Masaharu Goto



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:18 MET