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