[ROOT] Dictionary for operator<<(ostream&, const Class&)

From: Laurent Aphecetche (aphecetc@in2p3.fr)
Date: Fri May 04 2001 - 13:00:17 MEST


Hi Rooters,

I have a bit of a difficulty to make rootcint producing the right
dictionary for the classical "ostream& operator<<(ostream&, const
Class&)" operator.

If I do this (i.e. the thing I would like to do) :

class Class {

public:
  friend ostream& operator << (ostream&, const Class&) ;
...
} ;

and uses a LinkDef.h :

#ifdef __CINT__

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class Class-!;
#pragma link C++ function operator << (ostream&,const Class&) ;

I got no code whatsoever in ClassDict.C for the << operator.

Now, if I do :

class Class {
...};

ostream& operator << (ostream&, const Class&) ;

with the same LinkDef.h, then I do have the correct dictionary.

How can I make rootcint understand the first (preferred) form ?

Thanks for your help,

-- 
Dr. Laurent APHECETCHE (mailto:aphecetc@in2p3.fr) (IN2P3-CNRS) 
SUBATECH-EMN-4 rue Alfred Kastler-BP 20722-44307 NANTES cedex 03
TEL (+33/0) 2 51 85 84 17 - FAX (+33/0) 2 51 85 84 24 (France)
Collaborations PHENIX http://www.phenix.bnl.gov/~aphecetc et MEGAPIE.



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