stream_out.pass.cpp revision f5256e16dfc425c1d466f6308d4026d529ce9e0b
1//===----------------------------------------------------------------------===//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10// test:
11
12// template <class charT, class traits, size_t N>
13// basic_istream<charT, traits>&
14// operator>>(basic_istream<charT, traits>& is, bitset<N>& x);
15
16#include <bitset>
17#include <sstream>
18#include <cassert>
19
20int main()
21{
22    std::ostringstream os;
23    std::bitset<8> b(0x5A);
24    os << b;
25    assert(os.str() == "01011010");
26}
27