Skip to content

Repo sync for protected CLA branch #3993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/standard-library/match-results-class.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
description: "Learn more about: match_results Class"
title: "match_results Class"
ms.date: "09/10/2018"
ms.date: 06/17/2022
f1_keywords: ["regex/std::match_results"]
helpviewer_keywords: ["match_results class"]
ms.assetid: b504fdca-e5dd-429d-9960-6e27c9167fa6
ms.custom: devdivchpfy22
---

# match_results Class

Holds a sequence of submatches.
Expand Down Expand Up @@ -416,7 +418,7 @@ Index of the submatch.

### Remarks

The member function returns a reference to element *n* of the controlled sequence, or a reference to an empty `sub_match` object if `size() <= n` or if capture group *n* was not part of the match.
The member function returns a reference to element *n* of the controlled sequence, or a reference to an empty `sub_match` object if `size() <= n` or if capture group *n* wasn't part of the match.

## <a name="position"></a> match_results::position

Expand Down Expand Up @@ -539,7 +541,7 @@ The match_results object to swap with.

### Remarks

The member function swaps the contents of **`*this`** and *right* in constant time and does not throw exceptions.
The member function swaps the contents of **`*this`** and *right* in constant time and doesn't throw exceptions.

## <a name="value_type"></a> match_results::value_type

Expand Down
14 changes: 8 additions & 6 deletions docs/standard-library/move-iterator-class.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
---
description: "Learn more about: move_iterator Class"
title: "move_iterator Class"
ms.date: "03/27/2019"
ms.date: 06/17/2022
f1_keywords: ["iterator/std::move_iterator", "iterator/std::move_iterator::iterator_type", "iterator/std::move_iterator::iterator_category", "iterator/std::move_iterator::value_type", "iterator/std::move_iterator::difference_type", "iterator/std::move_iterator::pointer", "iterator/std::move_iterator::reference", "iterator/std::move_iterator::base"]
helpviewer_keywords: ["std::move_iterator [C++]", "std::move_iterator [C++], iterator_type", "std::move_iterator [C++], iterator_category", "std::move_iterator [C++], value_type", "std::move_iterator [C++], difference_type", "std::move_iterator [C++], pointer", "std::move_iterator [C++], reference", "std::move_iterator [C++], base"]
ms.assetid: a5e5cdd8-a264-4c6b-9f9c-68b0e8edaab7
ms.custom: devdivchpfy22
---

# move_iterator Class

Class template `move_iterator` is a wrapper for an iterator. The move_iterator provides the same behavior as the iterator it wraps (stores), except it turns the stored iterators dereference operator into an rvalue reference, turning a copy into a move. For more information about rvalues, see [Rvalue Reference Declarator: &&](../cpp/rvalue-reference-declarator-amp-amp.md).
Class template `move_iterator` is a wrapper for an iterator. The move_iterator provides the same behavior as the iterator it wraps (stores), except it turns the stored iterator's dereference operator into an rvalue reference, turning a copy into a move. For more information about rvalues, see [Rvalue Reference Declarator: &&](../cpp/rvalue-reference-declarator-amp-amp.md).

## Syntax

Expand All @@ -20,7 +22,7 @@ class move_iterator;

The class template describes an object that behaves like an iterator except when dereferenced. It stores a random-access iterator of type `Iterator`, accessed by way of the member function `base()`. All operations on a `move_iterator` are performed directly on the stored iterator, except that the result of `operator*` is implicitly cast to `value_type&&` to make an rvalue reference.

A `move_iterator` might be capable of operations that are not defined by the wrapped iterator. These operations should not be used.
A `move_iterator` might be capable of operations that aren't defined by the wrapped iterator. These operations shouldn't be used.

### Constructors

Expand Down Expand Up @@ -50,8 +52,8 @@ A `move_iterator` might be capable of operations that are not defined by the wra
|Operator|Description|
|-|-|
|[move_iterator::operator*](#op_star)|Returns `(reference)*base().`|
|[move_iterator::operator++](#op_add_add)|Increments the stored iterator. Exact behavior depends on whether it is a preincrement or a postincrement operation.|
|[move_iterator::operator--](#operator--)|Decrements the stored iterator. Exact behavior depends on whether it is a predecrement or a postdecrement operation.|
|[move_iterator::operator++](#op_add_add)|Increments the stored iterator. Exact behavior depends on whether it's a preincrement or a postincrement operation.|
|[move_iterator::operator--](#operator--)|Decrements the stored iterator. Exact behavior depends on whether it's a predecrement or a postdecrement operation.|
|[`move_iterator::operator->`](#op_arrow)|Returns `&**this`.|
|[move_iterator::operator-](#operator-)|Returns `move_iterator(*this) -=` by first subtracting the right-hand value from the current position.|
|[move_iterator::operator[]](#op_at)|Returns `(reference)*(*this + off)`. Allows you to specify an offset from the current base to obtain the value at that location.|
Expand Down Expand Up @@ -170,7 +172,7 @@ The operator evaluates `*this += -_Off`. Then returns **`*this`**.

## <a name="op_add_add"></a> move_iterator::operator++

Increments the stored iterator that belongs to this `move_iterator.` The current element is accessed by the postincrement operator. The next element is accessed by the preincrement operator.
Increments the stored iterator that belongs to this `move_iterator`. The current element is accessed by the postincrement operator. The next element is accessed by the preincrement operator.

```cpp
move_iterator& operator++();
Expand Down
4 changes: 3 additions & 1 deletion docs/standard-library/nested-exception-class.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
description: "Learn more about: nested_exception Class"
title: "nested_exception Class"
ms.date: "11/04/2016"
ms.date: 06/17/2022
f1_keywords: ["exception/std::nested_exception"]
helpviewer_keywords: ["nested_exception class"]
ms.assetid: 5ae2c4ef-c7ad-4469-8a9e-a773e86bb000
ms.custom: devdivchpfy22
---

# nested_exception Class

The class describes an exception for use with multiple inheritance. It captures the currently handled exception and stores it for later use.
Expand Down
8 changes: 5 additions & 3 deletions docs/standard-library/ostream-iterator-class.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
description: "Learn more about: ostream_iterator Class"
title: "ostream_iterator Class"
ms.date: "11/04/2016"
ms.date: 06/17/2022
f1_keywords: ["iterator/std::ostream_iterator", "iterator/std::ostream_iterator::char_type", "iterator/std::ostream_iterator::ostream_type", "iterator/std::ostream_iterator::traits_type"]
helpviewer_keywords: ["std::ostream_iterator [C++]", "std::ostream_iterator [C++], char_type", "std::ostream_iterator [C++], ostream_type", "std::ostream_iterator [C++], traits_type"]
ms.assetid: 24d842d3-9f45-4bf6-a697-62f5968f5a03
ms.custom: devdivchpfy22
---

# ostream_iterator Class

The class template ostream_iterator describes an output iterator object that writes successive elements onto the output stream with the extraction `operator <<`.
Expand Down Expand Up @@ -121,7 +123,7 @@ A reference to the `ostream_iterator`.

### Remarks

The requirements for an output iterator that the `ostream_iterator` must satisfy require only the expression \* *ii* = *t* be valid and says nothing about the **`operator`** or the `operator=` on their own. The member operator in this implementation returns **\*this**.
The requirements for an output iterator that the `ostream_iterator` must satisfy require only the expression \* *ii* = *t* be valid and says nothing about the **`operator`** or the `operator=` on their own. The member operator in this implementation returns **`*this`**.

### Example

Expand Down Expand Up @@ -171,7 +173,7 @@ A reference to the `ostream_iterator`.

### Remarks

These member operators both return **\*this**.
These member operators both return **`*this`**.

### Example

Expand Down
16 changes: 9 additions & 7 deletions docs/standard-library/packaged-task-class.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
---
description: "Learn more about: packaged_task Class"
title: "packaged_task Class"
ms.date: "11/04/2016"
ms.date: 06/17/2022
f1_keywords: ["future/std::packaged_task", "future/std::packaged_task::packaged_task", "future/std::packaged_task::get_future", "future/std::packaged_task::make_ready_at_thread_exit", "future/std::packaged_task::reset", "future/std::packaged_task::swap", "future/std::packaged_task::valid", "future/std::packaged_task::operator()", "future/std::packaged_task::operator bool"]
ms.assetid: 0a72cbe3-f22a-4bfe-8e50-dcb268c98780
helpviewer_keywords: ["std::packaged_task [C++]", "std::packaged_task [C++], packaged_task", "std::packaged_task [C++], get_future", "std::packaged_task [C++], make_ready_at_thread_exit", "std::packaged_task [C++], reset", "std::packaged_task [C++], swap", "std::packaged_task [C++], valid"]
ms.custom: devdivchpfy22
---

# packaged_task Class

Describes an *asynchronous provider* that is a call wrapper whose call signature is `Ty(ArgTypes...)`. Its *associated asynchronous state* holds a copy of its callable object in addition to the potential result.
Expand Down Expand Up @@ -33,7 +35,7 @@ class packaged_task;
|[get_future](#get_future)|Returns a [future](../standard-library/future-class.md) object that has the same associated asynchronous state.|
|[make_ready_at_thread_exit](#make_ready_at_thread_exit)|Calls the callable object that's stored in the associated asynchronous state and atomically stores the returned value.|
|[reset](#reset)|Replaces the associated asynchronous state.|
|[swap](#swap)|Exchanges the associated asynchronous state with that of a specified object.|
|[swap](#swap)|Exchanges the associated asynchronous state with a specified object.|
|[valid](#valid)|Specifies whether the object has an associated asynchronous state.|

### Public Operators
Expand All @@ -60,7 +62,7 @@ future<Ty> get_future();

### Remarks

If the `packaged_task` object does not have an associated asynchronous state, this method throws a [future_error](../standard-library/future-error-class.md) that has an error code of `no_state`.
If the `packaged_task` object doesn't have an associated asynchronous state, this method throws a [future_error](../standard-library/future-error-class.md) that has an error code of `no_state`.

If this method has already been called for a `packaged_task` object that has the same associated asynchronous state, the method throws a `future_error` that has an error code of `future_already_retrieved`.

Expand All @@ -80,7 +82,7 @@ If this method or [make_ready_at_thread_exit](#make_ready_at_thread_exit) has al

Otherwise, this operator calls `INVOKE(fn, args..., Ty)`, where *fn* is the callable object that's stored in the associated asynchronous state. Any returned value is stored atomically as the returned result of the associated asynchronous state.

In contrast to [packaged_task::operator()](#op_call), the associated asynchronous state is not set to `ready` until after all thread-local objects in the calling thread have been destroyed. Typically, threads that are blocked on the associated asynchronous state are not unblocked until the calling thread exits.
In contrast to [packaged_task::operator()](#op_call), the associated asynchronous state isn't set to `ready` until after all thread-local objects in the calling thread have been destroyed. Typically, threads that are blocked on the associated asynchronous state aren't unblocked until the calling thread exits.

## <a name="op_eq"></a> packaged_task::operator=

Expand Down Expand Up @@ -177,7 +179,7 @@ Destroys a `packaged_task` object.

### Remarks

If the *associated asynchronous state* is not *ready*, the destructor stores a [future_error](../standard-library/future-error-class.md) exception that has an error code of `broken_promise` as the result in the associated asynchronous state, and any threads that are blocked on the associated asynchronous state become unblocked.
If the *associated asynchronous state* isn't *ready*, the destructor stores a [future_error](../standard-library/future-error-class.md) exception that has an error code of `broken_promise` as the result in the associated asynchronous state, and any threads that are blocked on the associated asynchronous state become unblocked.

## <a name="reset"></a> packaged_task::reset

Expand All @@ -189,11 +191,11 @@ void reset();

### Remarks

In effect, this method executes `*this = packaged_task(move(fn))`, where *fn* is the function object that's stored in the associated asynchronous state for this object. Therefore, the state of the object is cleared, and [get_future](#get_future), [operator()](#op_call), and [make_ready_at_thread_exit](#make_ready_at_thread_exit) can be called as if on a newly-constructed object.
In effect, this method executes `*this = packaged_task(move(fn))`, where *fn* is the function object that's stored in the associated asynchronous state for this object. Therefore, the state of the object is cleared, and [get_future](#get_future), [operator()](#op_call), and [make_ready_at_thread_exit](#make_ready_at_thread_exit) can be called as if on a newly constructed object.

## <a name="swap"></a> packaged_task::swap

Exchanges the associated asynchronous state with that of a specified object.
Exchanges the associated asynchronous state with a specified object.

```cpp
void swap(packaged_task& Right) noexcept;
Expand Down
6 changes: 4 additions & 2 deletions docs/standard-library/path-class.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
---
description: "Learn more about: path Class"
title: "path Class"
ms.date: "09/27/2018"
ms.date: 06/17/2022
f1_keywords: ["filesystem/std::experimental::filesystem::path"]
ms.custom: devdivchpfy22
---

# `path` Class

The **`path`** class stores an object of type `string_type`, called `myname` here for the purposes of exposition, suitable for use as a pathname. `string_type` is a synonym for `basic_string<value_type>`, where `value_type` is a synonym for **`wchar_t`** on Windows or **`char`** on POSIX.
Expand Down Expand Up @@ -633,7 +635,7 @@ static constexpr value_type preferred_separator == '/';

### Remarks

Note that it's equally permissible in most contexts under Windows to use `L'/'` in its place.
It's equally permissible in most contexts under Windows to use `L'/'` in its place.

## <a name="relative_path"></a> `path::relative_path`

Expand Down
13 changes: 7 additions & 6 deletions docs/standard-library/promise-class.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
---
description: "Learn more about: promise Class"
title: "promise Class"
ms.date: "10/18/2018"
ms.date: 06/17/2022
f1_keywords: ["future/std::promise", "future/std::promise::promise", "future/std::promise::get_future", "future/std::promise::set_exception", "future/std::promise::set_exception_at_thread_exit", "future/std::promise::set_value", "future/std::promise::set_value_at_thread_exit", "future/std::promise::swap"]
ms.assetid: 2931558c-d94a-4ba1-ac4f-20bf7b6e23f9
helpviewer_keywords: ["std::promise [C++]", "std::promise [C++], promise", "std::promise [C++], get_future", "std::promise [C++], set_exception", "std::promise [C++], set_exception_at_thread_exit", "std::promise [C++], set_value", "std::promise [C++], set_value_at_thread_exit", "std::promise [C++], swap"]
ms.custom: devdivchpfy22
---
# promise Class

Expand Down Expand Up @@ -101,7 +102,7 @@ promise(promise&& Other) noexcept;
### Parameters

*Al*\
A memory allocator. See [\<allocators>](../standard-library/allocators-header.md) for more information.
A memory allocator. For more information about allocators, see [\<allocators>](../standard-library/allocators-header.md).

*Other*\
A `promise` object.
Expand Down Expand Up @@ -154,7 +155,7 @@ If the promise object has no *associated asynchronous state*, this method throws

If [set_exception](#set_exception), `set_exception_at_thread_exit`, [set_value](#set_value), or [set_value_at_thread_exit](#set_value_at_thread_exit) has already been called for a `promise` object that has the same associated asynchronous state, this method throws a `future_error` that has an error code of `promise_already_satisfied`.

In contrast to [set_exception](#set_exception), this method does not set the associated asynchronous state to ready until after all thread-local objects in the current thread have been destroyed. Typically, threads that are blocked on the associated asynchronous state are not unblocked until the current thread exits.
In contrast to [set_exception](#set_exception), this method doesn't set the associated asynchronous state to ready until after all thread-local objects in the current thread have been destroyed. Typically, threads that are blocked on the associated asynchronous state aren't unblocked until the current thread exits.

## <a name="set_value"></a> promise::set_value

Expand All @@ -180,9 +181,9 @@ If [set_exception](#set_exception), [set_exception_at_thread_exit](#set_exceptio

As a result of this method, any threads that are blocked on the associated asynchronous state become unblocked.

The first method also throws any exception that is thrown when *Val* is copied into the associated asynchronous state. In this situation, the associated asynchronous state is not set to ready.
The first method also throws any exception that is thrown when *Val* is copied into the associated asynchronous state. In this situation, the associated asynchronous state isn't set to ready.

The second method also throws any exception that is thrown when *Val* is moved into the associated asynchronous state. In this situation, the associated asynchronous state is not set to ready.
The second method also throws any exception that is thrown when *Val* is moved into the associated asynchronous state. In this situation, the associated asynchronous state isn't set to ready.

For the partial specialization `promise<Ty&>`, the stored value is in effect a reference to *Val*.

Expand Down Expand Up @@ -210,7 +211,7 @@ If the promise object has no *associated asynchronous state*, this method throws

If [set_exception](#set_exception), [set_exception_at_thread_exit](#set_exception_at_thread_exit), [set_value](#set_value), or `set_value_at_thread_exit` has already been called for a `promise` object that has the same associated asynchronous state, this method throws a `future_error` that has an error code of `promise_already_satisfied`.

In contrast to `set_value`, the associated asynchronous state is not set to ready until after all thread-local objects in the current thread have been destroyed. Typically, threads that are blocked on the associated asynchronous state are not unblocked until the current thread exits.
In contrast to `set_value`, the associated asynchronous state isn't set to ready until after all thread-local objects in the current thread have been destroyed. Typically, threads that are blocked on the associated asynchronous state aren't unblocked until the current thread exits.

The first method also throws any exception that is thrown when *Val* is copied into the associated asynchronous state.

Expand Down
Loading