1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // UNSUPPORTED: c++98, c++03
10 
11 // <sstream>
12 
13 // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
14 // class basic_stringstream
15 
16 // basic_stringstream(basic_stringstream&& rhs);
17 
18 #include <sstream>
19 #include <vector>
20 #include <string>
21 #include <cassert>
22 #include <cstddef>
23 
24 int main(int, char**)
25 {
26     std::vector<std::istringstream> vecis;
27     vecis.push_back(std::istringstream());
28     vecis.back().str("hub started at [00 6b 8b 45 69]");
29     vecis.push_back(std::istringstream());
30     vecis.back().str("hub started at [00 6b 8b 45 69]");
31     for (std::size_t n = 0; n < vecis.size(); n++)
32     {
33         assert(vecis[n].str().size() == 31);
34         vecis[n].seekg(0, std::ios_base::beg);
35         assert(vecis[n].str().size() == 31);
36     }
37 
38   return 0;
39 }
40