[ProfileData] Avoid repeated hash lookups (NFC) (#125464)
[llvm-project.git] / libcxx / test / std / input.output / string.streams / stringstream / stringstream.cons / move2.pass.cpp
blob05eeb65f6072a9d6ad9946eebf421341ba9326af
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 //===----------------------------------------------------------------------===//
9 // UNSUPPORTED: c++03
11 // <sstream>
13 // template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
14 // class basic_stringstream
16 // basic_stringstream(basic_stringstream&& rhs);
18 #include <sstream>
19 #include <vector>
20 #include <string>
21 #include <cassert>
22 #include <cstddef>
24 #include "test_macros.h"
26 int main(int, char**)
28 std::vector<std::stringstream> vecss;
29 vecss.push_back(std::stringstream());
30 vecss.back().str("hub started at [00 6b 8b 45 69]");
31 vecss.push_back(std::stringstream());
32 vecss.back().str("hub started at [00 6b 8b 45 69]");
33 for (std::size_t n = 0; n < vecss.size(); n++) {
34 assert(vecss[n].str().size() == 31);
35 vecss[n].seekg(0, std::ios_base::beg);
36 assert(vecss[n].str().size() == 31);
39 return 0;