CINT and operator->

From: George Heintzelman (gah@bnl.gov)
Date: Fri Jan 21 2000 - 21:10:37 MET


Hi rooters.

 I have a class (call it MyIter) on which I define operator->(). This 
is a specific iterator class to be fast and handle typesafety, and 
overloading operator->() is normal and natural for such classes.

If I do MyIter y; y->Function(), in C++ this is turned into something 
like:

(y.operator->())->Function()

where y.operator->() returns a pointer to an object of some other class.

but in CINT, it looks like we are running into CINT's extension of 
allowing the equivalence of . and ->, and it tells me that Function() 
is not a member of class MyIter.

It would be very nice if CINT would just check first to see if 
operator-> is defined on the class, and if so use C++ semantics for it, 
before using the extension to the language.

George Heintzelman
gah@bnl.gov



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