41 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// UNSUPPORTED: c++0310 11// <sstream>12 13// template <class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >14// class basic_stringstream15 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 26int main(int, char**)27{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);37 }38 39 return 0;40}41