Cast operator

Hello,

Is it here some limitations on cast operator in the CINT?
Or may be, I’m wrong somewhere?

File casttest.C with example in attachment:

#include <iostream>
using namespace std;

class B{
   double b;
public:
   B(double vb):b(vb){};
   void print(){cout<<b<<endl;}
};

class A{
   int a;
public:
   A(int va):a(va){};
   operator B(){return B(a+0.5);};
   void print(){cout<<a<<endl;};
};

And after calling in a interpred mode, it give a segmentation fault.
According to the call stack: It’s look like a recirculation during resolving a overload.

Thank in advance,
Fedor
casttest.C (255 Bytes)

Hi,

I can indeed reproduce the problem. There are several other known problem with conversion operator. We are in the middle of a major restructuration of the CINT code. We’ll be looking at those issues once this restructuration is done.

Cheers,
Philippe