• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #include <cstddef>
22 
main()23 int main()
24 {
25 #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES
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 #endif  // _LIBCPP_HAS_NO_RVALUE_REFERENCES
38 }
39