move2.pass.cpp 1.1 KB

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