P
Peter Bromley
Hi,
I have a managed __value type which I am attempting to create and use
but there are a number of problems - seemingly in the C++ compiler.
From MSDN: operator ~() should be equivalent to op_OnesComplement and I
believe the signature is:
static MyType op_OnesComplement(MyType left)
But when I attempt to use the operator with
x = ~y;
I get "error C2678: binary '~' : no operator found which takes a
left-hand operand of type 'MyType' (or there is no acceptable conversion)"
Additionally the compiler doesn't seem to understand the following
statements either:
x &= y; // op_BitwiseAndAssigment?
x != y; // op_BitwiseOrAssigment?
x ^= y; // op_ExclusiveOrAssignment?
Is there anybody who knows if either of these is a compiler problem or
am I just plain doing something wrong?
Thanks,
Peter Bromley
--
If you wish to reply to me directly, my addres is spam proofed as:
pbromley at adi dot co dot nz
Or if you prefer - (e-mail address removed)
I have a managed __value type which I am attempting to create and use
but there are a number of problems - seemingly in the C++ compiler.
From MSDN: operator ~() should be equivalent to op_OnesComplement and I
believe the signature is:
static MyType op_OnesComplement(MyType left)
But when I attempt to use the operator with
x = ~y;
I get "error C2678: binary '~' : no operator found which takes a
left-hand operand of type 'MyType' (or there is no acceptable conversion)"
Additionally the compiler doesn't seem to understand the following
statements either:
x &= y; // op_BitwiseAndAssigment?
x != y; // op_BitwiseOrAssigment?
x ^= y; // op_ExclusiveOrAssignment?
Is there anybody who knows if either of these is a compiler problem or
am I just plain doing something wrong?
Thanks,
Peter Bromley
--
If you wish to reply to me directly, my addres is spam proofed as:
pbromley at adi dot co dot nz
Or if you prefer - (e-mail address removed)