1 //===----------------------------------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_STRSTREAM
15 // explicit strstreambuf(streamsize alsize_arg = 0); // before C++20
16 // strstreambuf() : strstreambuf(0) {} // C++20
17 // explicit strstreambuf(streamsize alsize_arg); // C++20
22 #include "test_macros.h"
23 #if TEST_STD_VER >= 11
24 #include "test_convertible.h"
31 assert(s
.str() == nullptr);
32 assert(s
.pcount() == 0);
35 std::strstreambuf
s(1024);
36 LIBCPP_ASSERT(s
.str() == nullptr);
37 assert(s
.pcount() == 0);
40 #if TEST_STD_VER >= 11
42 typedef std::strstreambuf B
;
43 static_assert(test_convertible
<B
>(), "");
44 static_assert(!test_convertible
<B
, std::streamsize
>(), "");