In C++14 you will be able to use binary literals with the following syntax:
0b010101010 /* more zeros and ones */
This feature is already implemented in the latest clang
and gcc
. You can try it if you run those compilers with -std=c++1y
option.
More Related Contents:
- Why ‘&’ reference in not required in classes in C++?
- C++ sorting and keeping track of indexes
- Is it safe to delete a NULL pointer?
- c++ virtual inheritance
- __FILE__, __LINE__, and __FUNCTION__ usage in C++
- Why are C++ inline functions in the header?
- Qt5 Static Build yields Failed to load platform plugin “windows”
- What does the single ampersand after the parameter list of a member function declaration mean?
- How to read/write arbitrary bits in C/C++
- Can a bool read/write operation be not atomic on x86? [duplicate]
- What does “ provide, and where is it documented?
- When does OpenGL get finished with pointers in functions?
- How to make a variadic macro for std::cout?
- C++ – GetUserName() when process is run as administrator
- clock function in C++ with threads
- Reason for using non-type template parameter instead of regular parameter?
- std::vector to string with custom delimiter
- Are class members guaranteed to be contiguous in memory?
- Is there a range class in C++11 for use with range based for loops?
- Same random numbers every time I run the program
- Understanding rvalue references
- How do you copy/paste from the clipboard in C++?
- CMake Error: “add_subdirectory not given a binary directory”
- Why do you use typedef when declaring an enum in C++?
- Static library debug symbols
- allocating vectors (or vectors of vectors) dynamically
- QScrollArea with dynamically changing contents
- Difference between steady_clock vs system_clock?
- Why does (i|o)fstream take a const char* parameter for a file name?
- Is it possible to have a pointer literal?