diff options
Diffstat (limited to 'libcxx/test/std/depr')
-rw-r--r-- | libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp new file mode 100644 index 00000000000..2336eb051ea --- /dev/null +++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.members/overflow.pass.cpp @@ -0,0 +1,32 @@ +//===----------------------------------------------------------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is dual licensed under the MIT and the University of Illinois Open +// Source Licenses. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +// <strstream> + +// class strstreambuf + +// int overflow(int c); + +#include <iostream> +#include <string> +#include <strstream> + +int main(int, char const **argv) { + std::ostrstream oss; + std::string s; + + for (int i = 0; i < 4096; ++i) + s.push_back((i % 16) + 'a'); + + oss << s << std::ends; + std::cout << oss.str(); + oss.freeze(false); + + return 0; +} |