As far as I know, it was not suggested to add a formatting flag to add binary formatting and / or the std::bin manipulator. You can check out the offers at http://www.open-std.org/jtc1/sc22/wg21/docs/papers/ . I am pretty sure that the proposal to add binary literals did not add this feature (a quick search showed N3472, but I'm not sure if this is the latest version of the article).
From a technical point of view, this may not be easy to add! All of the various flags are usually stored in a single word in the stream class, and there are different reasons to use all bits. The existing three parameters ( std::ios_base::oct , std::ios_base::dec , std::ios_base::hex ) can be stored in just 2 bits. Of course, three values will leave one value open, except that this value is usually taken as the default setting, that is, without fixing the base when reading. As a result, it may be necessary to change the layout of the stream classes or make processing less efficient (for example, using iword() in some way to store additional binary formatting capabilities). I did not analyze if there is a real problem with any of the implementations (I know that there is not one for my implementation, but I really used all the bits in the word, if I remember correctly).
If you want to support binary formatting, it is relatively easy to add via custom std::num_put<char> . The following is a simple example. It has nothing to do with some formatting options that might be desirable, such as indentation or delimiter numbers:
#include <iostream> #include <limits> #include <locale> class binary_num_put : public std::num_put<char> { template <typename T> iter_type common_put(iter_type out, std::ios_base& str, char_type fill, T original, unsigned long long v) const { if (str.flags() & std::ios_base::basefield) { return this->std::num_put<char>::do_put(out, str, fill, original); } if (str.flags() & std::ios_base::showbase) { *out++ = '0'; *out++ = str.flags() & std::ios_base::uppercase? 'B': 'b'; } unsigned long long mask(1ull << (std::numeric_limits<unsigned long long>::digits - 1)); while (mask && !(mask & v)) { mask >>= 1; } if (mask) { for (; mask; mask >>= 1) { *out++ = v & mask? '1': '0'; } } else { *out++ = '0'; } return out; } iter_type do_put(iter_type out, std::ios_base& str, char_type fill, long v) const { return common_put(out, str, fill, v, static_cast<unsigned long>(v)); } iter_type do_put(iter_type out, std::ios_base& str, char_type fill, long long v) const { return common_put(out, str, fill, v, static_cast<unsigned long long>(v)); } iter_type do_put(iter_type out, std::ios_base& str, char_type fill, unsigned long v) const { return common_put(out, str, fill, v, v); } iter_type do_put(iter_type out, std::ios_base& str, char_type fill, unsigned long long v) const { return common_put(out, str, fill, v, v); } }; std::ostream& bin(std::ostream& out) { auto const& facet = std::use_facet<std::num_get<char>>(out.getloc()); if (!dynamic_cast<binary_num_put const*>(&facet)) { std::locale loc(std::locale(), new binary_num_put); out.imbue(loc); } out.setf(std::ios_base::fmtflags(), std::ios_base::basefield); return out; } int main() { std::cout << std::showbase << bin << 12345 << " " << std::dec << 12345 << "\n"; }