1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
12 // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
13 // class basic_ostringstream
15 // basic_ostringstream(basic_ostringstream&& rhs);
22 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
24 std::ostringstream ss0(" 123 456");
25 std::ostringstream ss(std::move(ss0));
26 assert(ss.rdbuf() != 0);
28 assert(ss.str() == " 123 456");
30 ss << i << ' ' << 567;
31 assert(ss.str() == "234 5676");
34 std::wostringstream ss0(L" 123 456");
35 std::wostringstream ss(std::move(ss0));
36 assert(ss.rdbuf() != 0);
38 assert(ss.str() == L" 123 456");
40 ss << i << ' ' << 567;
41 assert(ss.str() == L"234 5676");
43 #endif // _LIBCPP_HAS_NO_RVALUE_REFERENCES