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 // <sstream>
11 
12 // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
13 // class basic_stringstream
14 
15 // basic_stringstream(basic_stringstream&& rhs);
16 
17 #include <sstream>
18 #include <vector>
19 #include <string>
20 #include <cassert>
21 
main()22 int main()
23 {
24 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
25     std::vector<std::istringstream> vecis;
26     vecis.push_back(std::istringstream());
27     vecis.back().str("hub started at [00 6b 8b 45 69]");
28     vecis.push_back(std::istringstream());
29     vecis.back().str("hub started at [00 6b 8b 45 69]");
30     for (int n = 0; n < vecis.size(); n++)
31     {
32         assert(vecis[n].str().size() == 31);
33         vecis[n].seekg(0, std::ios_base::beg);
34         assert(vecis[n].str().size() == 31);
35     }
36 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
37 }
38