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