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++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 #include "test_macros.h" 25 main(int,char **)26int main(int, char**) 27 { 28 std::vector<std::istringstream> vecis; 29 vecis.push_back(std::istringstream()); 30 vecis.back().str("hub started at [00 6b 8b 45 69]"); 31 vecis.push_back(std::istringstream()); 32 vecis.back().str("hub started at [00 6b 8b 45 69]"); 33 for (std::size_t n = 0; n < vecis.size(); n++) 34 { 35 assert(vecis[n].str().size() == 31); 36 vecis[n].seekg(0, std::ios_base::beg); 37 assert(vecis[n].str().size() == 31); 38 } 39 40 return 0; 41 } 42