I think you're doing some very wrong things.
First of all AFAIK a long is 4 bytes (=32 bits) and you're shifting it 38 bits. This will most definitely result in overflow of the value.
Second -not really a problem- is the way you use LOGWARN. The log function takes a formatted string so you should write LOGWARN("%i", x); instead of the whole std::to_string() stuff.
Last this totally blows my mind:
The order in which the shifts occur is not clear at all. And you're shifting it with the same value to both sides which should result in no change? idk.. confusing.
Do you know what you're doing or are you just trying something?
First of all AFAIK a long is 4 bytes (=32 bits) and you're shifting it 38 bits. This will most definitely result in overflow of the value.
Second -not really a problem- is the way you use LOGWARN. The log function takes a formatted string so you should write LOGWARN("%i", x); instead of the whole std::to_string() stuff.
Last this totally blows my mind:
Code:
long z2 = value << 38 >> 38;
Do you know what you're doing or are you just trying something?