C++11 - any built-in support for binary literals?

I've done some googling and as far as I can tell, I would have to write my own literal suffix operator to achieve a binary literal. I just wanted to check to be sure there isn't already one in the standard C++11 libraries (not another library like boost).
What do you mean by binary literal?
No, C++ has no binary literals.
@vlad OK, thanks.

@naraku in Java 7, for example:
int TheNumberSeventeen = 0b10001;
Even in Google if you type "17 to binary" it uses that notation.
Last edited on
In C++, it would have to be a suffix notation; something like 111010_b or 10111_B
http://liveworkspace.org/code/2VqOZt$0

The plus point (always a plus point in C++) is that the idea of literals is extensible; we can have literals for user defined types as well.
Topic archived. No new replies allowed.