[inout.ptr]

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

## 20.3 Smart pointers [[smartptr]](smartptr#inout.ptr)

### 20.3.4 Smart pointer adaptors [[smartptr.adapt]](smartptr.adapt#inout.ptr)

#### 20.3.4.4 Function template inout_ptr [inout.ptr]

[ð](#lib:inout_ptr)

`template<class Pointer = void, class Smart, class... Args>
  constexpr auto inout_ptr(Smart& s, Args&&... args);
`

[1](#1)

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

Let P be Pointer if is_void_v<Pointer> is false,
otherwise *POINTER_OF*(Smart)[.](#1.sentence-1)

[2](#2)

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

*Returns*: inout_ptr_t<Smart, P, Args&&...>(s, std​::​forward<Args>(args)...)[.](#2.sentence-1)
