1//===----------------------------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is dual licensed under the MIT and the University of Illinois Open 6// Source Licenses. 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