Re: Callable inerpreter

Onuchin Valeriy (onuchin@sirius.ihep.su)
Tue, 27 Jul 1999 21:57:23 +0400


Hello , sorry in previous message I was wrong
but probably following message from Masaharu can help.
Best regards, Valery

-------------------------------------------------------------------------

Dear Valery,

I implemented some pointer to member function capability in cint5.14.9.
I think it is risky to expose this feature to public, you need to add
G__PTR2MEMFUNC macro in makefile by yourself. cint5.14.9 will be exposed
in a few days from CERN.

Please understand that pointer to (member) function is vert slow and
risky in Cint and only very limited capability is supported.

Thank you
Masaharu Goto

# Pointer to member
+ Pointer to member functioin
Pointer to member function is newly supported from cint5.14.9. This
feature
is normally turned off. In order to activate, you need to define
G__PTR2MEMFUNC macro in platform dependency file and re-compile Cint.
This feature is only experimental and not recommended for use in
general.
Interpreted pointer to member function and compiled pointer to member
function are completely different objects. Mixing those concepts will
cause
fatal error. For example, following code works as long as everything
is
interpreted. However, it will cause fatal error if you precompile g()
and interpret main().

class A {
public:
void f() { }
};

typedef void (A::*A_p2mf)(void);

void g(A *pa,A_p2mf x) { (pa->*x)(); }

main() {
A a;
A_p2mf pf = &A::f;
(a.*pf)();
}

+ Pointer to data member
Pointer to data member is not supported.