Binary literals
Until C++14, standard C++ allowed to define numbers in three ways:
Anyhow, without special compiler extensions or additional libraries it was not allowed to define numbers in binary format. It changes with C++14 – the core language supports binary literals.
Define integer with 0b
or 0B
prefix to represent binary number.
It may be not the most crucial feature of C++ standard, but I believe there are cases when use of binary representation will improve readability of the code.
It’s worth noticing that the GCC has offered the possibility to define binary numbers since GCC 4.3 and Boost.Utility offers BOOST_BINARY
macro which also allows to create numbers in binary form.