//===----------------------------------------------------------------------===// // // ΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚΚThe LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // T5 setprecision(int n); #include #include template struct testbuf : public std::basic_streambuf { testbuf() {} }; int main() { { testbuf sb; std::istream is(&sb); is >> std::setprecision(10); assert(is.precision() == 10); } { testbuf sb; std::ostream os(&sb); os << std::setprecision(10); assert(os.precision() == 10); } { testbuf sb; std::wistream is(&sb); is >> std::setprecision(10); assert(is.precision() == 10); } { testbuf sb; std::wostream os(&sb); os << std::setprecision(10); assert(os.precision() == 10); } }