//===----------------------------------------------------------------------===// // // The LLVM Compiler Infrastructure // // This file is dual licensed under the MIT and the University of Illinois Open // Source Licenses. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // T6 setw(int n); #include #include template struct testbuf : public std::basic_streambuf { testbuf() {} }; int main() { { testbuf sb; std::istream is(&sb); is >> std::setw(10); assert(is.width() == 10); } { testbuf sb; std::ostream os(&sb); os << std::setw(10); assert(os.width() == 10); } { testbuf sb; std::wistream is(&sb); is >> std::setw(10); assert(is.width() == 10); } { testbuf sb; std::wostream os(&sb); os << std::setw(10); assert(os.width() == 10); } }