[unique.ptr.single.observers]

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

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

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

#### 20.3.1.3 unique_ptr for single objects [[unique.ptr.single]](unique.ptr.single#observers)

#### 20.3.1.3.5 Observers [unique.ptr.single.observers]

[ð](#lib:operator*,unique_ptr)

`constexpr add_lvalue_reference_t<T> operator*() const noexcept(noexcept(*declval<pointer>()));
`

[1](#1)

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

*Mandates*: reference_converts_from_temporary_v<add_lvalue_reference_t<T>, decltype(  
*declval<pointer>())> is false[.](#1.sentence-1)

[2](#2)

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

*Preconditions*: get() != nullptr is true[.](#2.sentence-1)

[3](#3)

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

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

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

`constexpr pointer operator->() const noexcept;
`

[4](#4)

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

*Preconditions*: get() != nullptr[.](#4.sentence-1)

[5](#5)

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

*Returns*: get()[.](#5.sentence-1)

[6](#6)

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

[*Note [1](#note-1)*:

The use of this function typically requires that T be a complete type[.](#6.sentence-1)

â *end note*]

[ð](#lib:get,unique_ptr)

`constexpr pointer get() const noexcept;
`

[7](#7)

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

*Returns*: The stored pointer[.](#7.sentence-1)

[ð](#lib:get_deleter,unique_ptr)

`constexpr deleter_type& get_deleter() noexcept;
constexpr const deleter_type& get_deleter() const noexcept;
`

[8](#8)

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

*Returns*: A reference to the stored deleter[.](#8.sentence-1)

[ð](#lib:operator_bool,unique_ptr)

`constexpr explicit operator bool() const noexcept;
`

[9](#9)

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

*Returns*: get() != nullptr[.](#9.sentence-1)
