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 int main()
22 {
23     std::shared_ptr<int> p(new int(3));
24     std::ostringstream os;
25     assert(os.str().empty());
26     os << p;
27     assert(!os.str().empty());
28 }
29