With C++ close relationship with the hardware. I was always mystified by the lack of support for base 2 literals. It’s common to see header files such as :
It works but I find this less readable than it could be. a typo is no readily obvious and can trigger strange behavior .
That is way I was pleased to find out that with C++ 14 you can now enter binary literal directly by prefixing it with either 0b or 0B :
Which I find more to the point.
Whenever possible it’s better to leave the boring repetitive computation stuff to the compiler it’s much better at this than us.