What's standing in the way of new operators added to the C/C++ standard, such as <<<
and >>>
for bitwise left and right rotate operations? Is there a reason why the standards organizations can't include such operators in a future spec?
I know there are other ways to accomplish this:
&
>>
|
<<
combo- Intrinsic functions
- Inline assembly
The problems with these workarounds are:
- Performance
- Readability
- Potentially more complex code generation
- Platform/compiler dependence
To me, this seems like an inconsistency. If they are already making the effort to provide simple, readable, high-performance operators for &
|
^
<<
and >>
, bitwise rotate operators shouldn't be any more difficult to support for 8-, 16-, 32-, and 64-bit signed/unsigned values.