www.digitalmars.com         C & C++   DMDScript  

c++.beta - Ambiguous type conversion with __int64

Hi,

The short C++ excerpt provided below causes DMC to display:

     v3 = v1 + v2;
                 ^
int64.cpp(20) : Error: ambiguous type conversion
--- errorlevel 1

I compiled using the command line:

dmc -c -g -mn -WD -L/noi -L/nol int64.cpp

Any idea what might be causing this? The same code compiles fine using 
MSVC or GCC.

Best regards,
Gilles

class INT64 {
public:
     __int64         mValue;
public:
     INT64();
     INT64(const INT64 &);
     INT64(__int64);
     // operators
     INT64 &operator =(const INT64 &);
     INT64 &operator =(__int64);
     operator __int64() const { return mValue; }
};

void main()
{
     INT64 v1(2);
     INT64 v2(4);
     INT64 v3;

     v3 = v1 + v2;
}
May 09 2006