io.pass.cpp revision f5256e16dfc425c1d466f6308d4026d529ce9e0b
1//===----------------------------------------------------------------------===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10// <memory> 11 12// shared_ptr 13 14// template<class CharT, class Traits, class Y> 15// basic_ostream<CharT, Traits>& 16// operator<<(basic_ostream<CharT, Traits>& os, shared_ptr<Y> const& p); 17 18#include <memory> 19#include <sstream> 20#include <cassert> 21 22int main() 23{ 24 std::shared_ptr<int> p(new int(3)); 25 std::ostringstream os; 26 assert(os.str().empty()); 27 os << p; 28 assert(!os.str().empty()); 29} 30