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 //===----------------------------------------------------------------------===// 8 9 // <strstream> 10 11 // class strstreambuf 12 13 // int overflow(int c); 14 15 #include <iostream> 16 #include <string> 17 #include <strstream> 18 19 #include "test_macros.h" 20 main(int,char **)21int main(int, char**) { 22 std::ostrstream oss; 23 std::string s; 24 25 for (int i = 0; i < 4096; ++i) 26 s.push_back((i % 16) + 'a'); 27 28 oss << s << std::ends; 29 std::cout << oss.str(); 30 oss.freeze(false); 31 32 return 0; 33 } 34