1 //===----------------------------------------------------------------------===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 // UNSUPPORTED: c++98, c++03
11 //  Because we don't have a functioning decltype in C++03
12 
13 // <memory>
14 
15 // unique_ptr
16 
17 // template<class CharT, class Traits, class Y, class D>
18 //   basic_ostream<CharT, Traits>&
19 //   operator<<(basic_ostream<CharT, Traits>& os, const unique_ptr<Y, D>& p);
20 
21 #include <memory>
22 #include <sstream>
23 #include <cassert>
24 
main()25 int main()
26 {
27     std::unique_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