Skip to content

Commit 2cdb8b5

Browse files
author
Colin Robertson
committed
Address link warnings
1 parent 1713943 commit 2cdb8b5

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

docs/standard-library/optional-class.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ template<class T> optional(T) -> optional<T>;
3737
|[~optional](#optional-destructor) | Destroys an object of type `optional`. |
3838
| **Assignment** | |
3939
| [operator=](#op_eq) | Replaces the `optional` with a copy of another `optional`. |
40-
| [emplace](#emplace) | Initializes the contained value with specified arguments. |
40+
| [emplace](#op_eq) | Initializes the contained value with specified arguments. |
4141
| **Swap** | |
4242
| [swap](#swap) | Swaps the contained value or the empty state with another `optional`. |
4343
| **Observers** | |
@@ -139,7 +139,7 @@ Replaces the contained value of an `optional` with a copy or move from another `
139139
```cpp
140140
optional& operator=(nullopt_t) noexcept;
141141
optional& operator=(const optional& rhs);
142-
optional& operator=(optional&&) noexcept(see below);
142+
optional& operator=(optional&&) noexcept( /* see below */ );
143143

144144
template <class U = T>
145145
optional& operator=(U&&);
@@ -154,7 +154,7 @@ template <class... Args>
154154
T& emplace(Args&&...);
155155

156156
template <class U, class... Args>
157-
T& emplace(initializer_list<U>, Args&&...);
157+
T& emplace(initializer_list<U>, Args&&...);
158158
```
159159
160160
## <a name="op_as"></a> operator->
@@ -193,6 +193,13 @@ Effectively, calls the destructor of the contained object, if any, and sets it t
193193
void reset() noexcept;
194194
```
195195

196+
## <a name="swap"></a> swap
197+
198+
```cpp
199+
template<class T>
200+
void swap(optional<T>&, optional<T>&) noexcept;
201+
```
202+
196203
## <a name="value"></a> value
197204
198205
```cpp

0 commit comments

Comments
 (0)