blob: b09550a6eab2760c97c9d27a8f33926aae8543a4 [file] [log] [blame]
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
// <memory>
// shared_ptr
// template<class CharT, class Traits, class Y>
// basic_ostream<CharT, Traits>&
// operator<<(basic_ostream<CharT, Traits>& os, shared_ptr<Y> const& p);
#include <memory>
#include <sstream>
#include <cassert>
int main(int, char**)
{
std::shared_ptr<int> p(new int(3));
std::ostringstream os;
assert(os.str().empty());
os << p;
assert(!os.str().empty());
return 0;
}