blob: 78d682fc44f63c5c5b1476fe7a796815b8cbbaba [file] [log] [blame]
Howard Hinnant1347d332013-04-03 20:21:29 +00001//===----------------------------------------------------------------------===//
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>
Stephan T. Lavaveje898b482016-11-23 22:01:19 +000021#include <cstddef>
Howard Hinnant1347d332013-04-03 20:21:29 +000022
23int 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]");
Stephan T. Lavaveje898b482016-11-23 22:01:19 +000031 for (std::size_t n = 0; n < vecis.size(); n++)
Howard Hinnant1347d332013-04-03 20:21:29 +000032 {
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}