Files
2025-10-25 03:02:53 +03:00

42 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[pointer.traits.functions]
# 20 Memory management library [[mem]](./#mem)
## 20.2 Memory [[memory]](memory#pointer.traits.functions)
### 20.2.3 Pointer traits [[pointer.traits]](pointer.traits#functions)
#### 20.2.3.3 Member functions [pointer.traits.functions]
[🔗](#lib:pointer_to,pointer_traits)
`static pointer pointer_traits::pointer_to(see below r);
static constexpr pointer pointer_traits<T*>::pointer_to(see below r) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L858)
*Mandates*: For the first member function,Ptr::pointer_to(r) is well-formed[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L863)
*Preconditions*: For the first member function,Ptr::pointer_to(r) returns a pointer to r through which indirection is valid[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L869)
*Returns*: The first member function returns Ptr::pointer_to(r)[.](#3.sentence-1)
The second member function returns addressof(r)[.](#3.sentence-2)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L874)
*Remarks*: If element_type is cv void, the type ofr is unspecified; otherwise, it is element_type&[.](#4.sentence-1)