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

86 lines
2.1 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.

[indirect.obs]
# 20 Memory management library [[mem]](./#mem)
## 20.4 Types for composite class design [[mem.composite.types]](mem.composite.types#indirect.obs)
### 20.4.1 Class template indirect [[indirect]](indirect#obs)
#### 20.4.1.6 Observers [indirect.obs]
[🔗](#lib:operator*,indirect)
`constexpr const T& operator*() const & noexcept;
constexpr T& operator*() & noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L6547)
*Preconditions*: *this is not valueless[.](#1.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L6551)
*Returns*: **p*[.](#2.sentence-1)
[🔗](#lib:operator*,indirect_)
`constexpr const T&& operator*() const && noexcept;
constexpr T&& operator*() && noexcept;
`
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L6563)
*Preconditions*: *this is not valueless[.](#3.sentence-1)
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L6567)
*Returns*: std::move(**p*)[.](#4.sentence-1)
[🔗](#lib:operator-%3e,indirect)
`constexpr const_pointer operator->() const noexcept;
constexpr pointer operator->() noexcept;
`
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L6579)
*Preconditions*: *this is not valueless[.](#5.sentence-1)
[6](#6)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L6583)
*Returns*: *p*[.](#6.sentence-1)
[🔗](#lib:valueless_after_move,indirect)
`constexpr bool valueless_after_move() const noexcept;
`
[7](#7)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L6594)
*Returns*: true if *this is valueless, otherwise false[.](#7.sentence-1)
[🔗](#lib:get_allocator,indirect)
`constexpr allocator_type get_allocator() const noexcept;
`
[8](#8)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/memory.tex#L6605)
*Returns*: *alloc*[.](#8.sentence-1)