[unique.ptr.io]

# 20 Memory management library [[mem]](./#mem)

## 20.3 Smart pointers [[smartptr]](smartptr#unique.ptr.io)

### 20.3.1 Unique-ownership pointers [[unique.ptr]](unique.ptr#io)

#### 20.3.1.7 I/O [unique.ptr.io]

[ð](#lib:operator%3c%3c,unique_ptr)

`template<class E, class T, class Y, class D>
  basic_ostream<E, T>& operator<<(basic_ostream<E, T>& os, const unique_ptr<Y, D>& p);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3439)

*Constraints*: os << p.get() is a valid expression[.](#1.sentence-1)

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3443)

*Effects*: Equivalent to: os << p.get();

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L3447)

*Returns*: os[.](#3.sentence-1)
