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 | // UNSUPPORTED: no-localization |
10 | |
11 | // <memory> |
12 | |
13 | // shared_ptr |
14 | |
15 | // template<class CharT, class Traits, class Y> |
16 | // basic_ostream<CharT, Traits>& |
17 | // operator<<(basic_ostream<CharT, Traits>& os, shared_ptr<Y> const& p); |
18 | |
19 | #include <memory> |
20 | #include <sstream> |
21 | #include <cassert> |
22 | |
23 | #include "test_macros.h" |
24 | |
25 | int main(int, char**) |
26 | { |
27 | std::shared_ptr<int> p(new int(3)); |
28 | std::ostringstream os; |
29 | assert(os.str().empty()); |
30 | os << p; |
31 | assert(!os.str().empty()); |
32 | |
33 | return 0; |
34 | } |
35 | |