Revert "[ORC][llvm-jitlink] Add SimpleLazyReexportsSpeculator, use in llvm-jitlink."
[llvm-project.git] / libcxx / test / std / depr / depr.str.strstreams / depr.strstreambuf / depr.strstreambuf.cons / default.pass.cpp
blob803be42fe756ffaaa52f4edf83f57a413f6db9eb
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 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX26_REMOVED_STRSTREAM
11 // <strstream>
13 // class strstreambuf
15 // explicit strstreambuf(streamsize alsize_arg = 0); // before C++20
16 // strstreambuf() : strstreambuf(0) {} // C++20
17 // explicit strstreambuf(streamsize alsize_arg); // C++20
19 #include <strstream>
20 #include <cassert>
22 #include "test_macros.h"
23 #if TEST_STD_VER >= 11
24 #include "test_convertible.h"
25 #endif
27 int main(int, char**)
30 std::strstreambuf s;
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>(), "");
46 #endif
48 return 0;