cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

BarsMonster
Journeyman III

Why ~ not supported?

error C2675: unary '~' : '__BrtInt1' does not define this operator or a conversion to a type acceptable to the predefine

Is it a known issue that ~ does not work?

This code

somevalue = ((~x) & (z));

get compiled in brcc without errors/warnings, but during c++ compilation of generated cpp file, I'm getting:

error C2675: unary '~' : '__BrtInt1' does not define this operator or a conversion to a type acceptable to the predefined operator

(VS2005)

 

Now I am using a workaround (((-1)^x) & (z)), but I afraid it might have performance penalty 😞

0 Likes
0 Replies