Skip to content

Commit 0e2d990

Browse files
authored
Merge pull request MicrosoftDocs#4363 from rachana-satao/RAS-1953534-replacing-this-keyword-5
updating this keyword -5
2 parents 809e5f0 + 05358ba commit 0e2d990

11 files changed

Lines changed: 84 additions & 62 deletions

‎docs/standard-library/scoped-allocator-adaptor-class.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
description: "Learn more about: scoped_allocator_adaptor Class"
33
title: "scoped_allocator_adaptor Class"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/20/2022
55
f1_keywords: ["scoped_allocator/std::scoped_allocator_adaptor", "scoped_allocator/std::scoped_allocator_adaptor::rebind Struct", "scoped_allocator/std::scoped_allocator_adaptor::allocate", "scoped_allocator/std::scoped_allocator_adaptor::construct", "scoped_allocator/std::scoped_allocator_adaptor::deallocate", "scoped_allocator/std::scoped_allocator_adaptor::destroy", "scoped_allocator/std::scoped_allocator_adaptor::inner_allocator", "scoped_allocator/std::scoped_allocator_adaptor::max_size", "scoped_allocator/std::scoped_allocator_adaptor::outer_allocator", "scoped_allocator/std::scoped_allocator_adaptor::select_on_container_copy_construction"]
66
helpviewer_keywords: ["std::scoped_allocator_adaptor", "std::scoped_allocator_adaptor::allocate", "std::scoped_allocator_adaptor::construct", "std::scoped_allocator_adaptor::deallocate", "std::scoped_allocator_adaptor::destroy", "std::scoped_allocator_adaptor::inner_allocator", "std::scoped_allocator_adaptor::max_size", "std::scoped_allocator_adaptor::outer_allocator", "std::scoped_allocator_adaptor::select_on_container_copy_construction"]
77
ms.assetid: 0d9b06a1-9a4a-4669-9470-8805cae48e89
8+
ms.custom: devdivchpfy22
89
---
10+
911
# scoped_allocator_adaptor Class
1012

1113
Represents a nest of allocators.
@@ -21,11 +23,11 @@ class scoped_allocator_adaptor;
2123
2224
The class template encapsulates a nest of one or more allocators. Each such class has an outermost allocator of type `outer_allocator_type`, a synonym for `Outer`, which is a public base of the `scoped_allocator_adaptor` object. `Outer` is used to allocate memory to be used by a container. You can obtain a reference to this allocator base object by calling `outer_allocator`.
2325
24-
The remainder of the nest has type `inner_allocator_type`. An inner allocator is used to allocate memory for elements within a container. You can obtain a reference to the stored object of this type by calling `inner_allocator`. If `Inner...` is not empty, `inner_allocator_type` has type `scoped_allocator_adaptor<Inner...>`, and `inner_allocator` designates a member object. Otherwise, `inner_allocator_type` has type `scoped_allocator_adaptor<Outer>`, and `inner_allocator` designates the entire object.
26+
The remainder of the nest has type `inner_allocator_type`. An inner allocator is used to allocate memory for elements within a container. You can obtain a reference to the stored object of this type by calling `inner_allocator`. If `Inner...` isn't empty, `inner_allocator_type` has type `scoped_allocator_adaptor<Inner...>`, and `inner_allocator` designates a member object. Otherwise, `inner_allocator_type` has type `scoped_allocator_adaptor<Outer>`, and `inner_allocator` designates the entire object.
2527
2628
The nest behaves as if it has arbitrary depth, replicating its innermost encapsulated allocator as needed.
2729
28-
Several concepts that are not a part of the visible interface aid in describing the behavior of this class template. An *outermost allocator* mediates all calls to the construct and destroy methods. It is effectively defined by the recursive function `OUTERMOST(X)`, where `OUTERMOST(X)` is one of the following.
30+
Several concepts that aren't a part of the visible interface aid in describing the behavior of this class template. An *outermost allocator* mediates all calls to the construct and destroy methods. It's effectively defined by the recursive function `OUTERMOST(X)`, where `OUTERMOST(X)` is one of the following.
2931
3032
- If `X.outer_allocator()` is well formed, then `OUTERMOST(X)` is `OUTERMOST(X.outer_allocator())`.
3133

‎docs/standard-library/shared-future-class.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
description: "Learn more about: shared_future Class"
33
title: "shared_future Class"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/20/2022
55
f1_keywords: ["future/std::shared_future", "future/std::shared_future::shared_future", "future/std::shared_future::get", "future/std::shared_future::valid", "future/std::shared_future::wait", "future/std::shared_future::wait_for", "future/std::shared_future::wait_until"]
66
ms.assetid: 454ebedd-f42b-405f-99a5-a25cc9ad7c90
77
helpviewer_keywords: ["std::shared_future [C++]", "std::shared_future [C++], shared_future", "std::shared_future [C++], get", "std::shared_future [C++], valid", "std::shared_future [C++], wait", "std::shared_future [C++], wait_for", "std::shared_future [C++], wait_until"]
8+
ms.custom: devdivchpfy22
89
---
10+
911
# shared_future Class
1012

1113
Describes an *asynchronous return object*. In contrast with a [future](../standard-library/future-class.md) object, an *asynchronous provider* can be associated with any number of `shared_future` objects.
@@ -19,9 +21,9 @@ class shared_future;
1921

2022
## Remarks
2123

22-
Do not call any methods other than `valid`, `operator=`, and the destructor on a `shared_future` object that's *empty*.
24+
Don't call any methods other than `valid`, `operator=`, and the destructor on a `shared_future` object that's *empty*.
2325

24-
`shared_future` objects are not synchronized. Calling methods on the same object from multiple threads introduces a data race that has unpredictable results.
26+
`shared_future` objects aren't synchronized. Calling methods on the same object from multiple threads introduces a data race that has unpredictable results.
2527

2628
## Members
2729

@@ -36,7 +38,7 @@ Do not call any methods other than `valid`, `operator=`, and the destructor on a
3638
|Name|Description|
3739
|----------|-----------------|
3840
|[get](#get)|Retrieves the result that's stored in the *associated asynchronous state*.|
39-
|[valid](#valid)|Specifies whether the object is not empty.|
41+
|[valid](#valid)|Specifies whether the object isn't empty.|
4042
|[wait](#wait)|Blocks the current thread until the associated asynchronous state is ready.|
4143
|[wait_for](#wait_for)|Blocks until the associated asynchronous state is ready or until the specified time has elapsed.|
4244
|[wait_until](#wait_until)|Blocks until the associated asynchronous state is ready or until a specified point in time.|

‎docs/standard-library/shared-ptr-class.md‎

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
description: "Learn more about: shared_ptr class"
33
title: "shared_ptr class"
4-
ms.date: "07/29/2019"
4+
ms.date: 06/20/2022
55
f1_keywords: ["memory/std::shared_ptr", "memory/std::shared_ptr::element_type", "memory/std::shared_ptr::get", "memory/std::shared_ptr::owner_before", "memory/std::shared_ptr::reset", "memory/std::shared_ptr::swap", "memory/std::shared_ptr::unique", "memory/std::shared_ptr::use_count", "memory/std::shared_ptr::operator boolean-type", "memory/std::shared_ptr::operator*", "memory/std::shared_ptr::operator=", "memory/std::shared_ptr::operator->"]
66
helpviewer_keywords: ["std::shared_ptr [C++]", "std::shared_ptr [C++], element_type", "std::shared_ptr [C++], get", "std::shared_ptr [C++], owner_before", "std::shared_ptr [C++], reset", "std::shared_ptr [C++], swap", "std::shared_ptr [C++], unique", "std::shared_ptr [C++], use_count", "std::shared_ptr [C++], element_type", "std::shared_ptr [C++], get", "std::shared_ptr [C++], owner_before", "std::shared_ptr [C++], reset", "std::shared_ptr [C++], swap", "std::shared_ptr [C++], unique", "std::shared_ptr [C++], use_count"]
77
ms.assetid: 1469fc51-c658-43f1-886c-f4530dd84860
8+
ms.custom: devdivchpfy22
89
---
10+
911
# `shared_ptr` class
1012

1113
Wraps a reference-counted smart pointer around a dynamically allocated object.
@@ -25,7 +27,7 @@ A `shared_ptr` stops owning a resource when it's reassigned or reset.
2527

2628
The template argument `T` might be an incomplete type except as noted for certain member functions.
2729

28-
When a `shared_ptr<T>` object is constructed from a resource pointer of type `G*` or from a `shared_ptr<G>`, the pointer type `G*` must be convertible to `T*`. If it's not convertible, the code will not compile. For example:
30+
When a `shared_ptr<T>` object is constructed from a resource pointer of type `G*` or from a `shared_ptr<G>`, the pointer type `G*` must be convertible to `T*`. If it's not convertible, the code won't compile. For example:
2931

3032
```cpp
3133
#include <memory>
@@ -63,29 +65,29 @@ The `shared_ptr` objects that own a resource share a control block. The control
6365
6466
- the custom allocator for the control block if it has one.
6567
66-
A `shared_ptr` object that is initialized by using a null pointer has a control block and is not empty. After a `shared_ptr` object releases a resource, it no longer owns that resource. After a `weak_ptr` object releases a resource, it no longer points to that resource.
68+
A `shared_ptr` object that is initialized by using a null pointer has a control block and isn't empty. After a `shared_ptr` object releases a resource, it no longer owns that resource. After a `weak_ptr` object releases a resource, it no longer points to that resource.
6769
6870
When the number of `shared_ptr` objects that own a resource becomes zero, the resource is freed, either by deleting it or by passing its address to a deleter, depending on how ownership of the resource was originally created. When the number of `shared_ptr` objects that own a resource is zero, and the number of `weak_ptr` objects that point to that resource is zero, the control block is freed, using the custom allocator for the control block if it has one.
6971
70-
An empty `shared_ptr` object does not own any resources and has no control block.
72+
An empty `shared_ptr` object doesn't own any resources and has no control block.
7173
7274
A deleter is a function object that has a member function `operator()`. Its type must be copy constructible, and its copy constructor and destructor must not throw exceptions. It accepts one parameter, the object to be deleted.
7375
7476
Some functions take an argument list that defines properties of the resulting `shared_ptr<T>` or `weak_ptr<T>` object. You can specify such an argument list in several ways:
7577
76-
no arguments -- the resulting object is an empty `shared_ptr` object or an empty `weak_ptr` object.
78+
no arguments: The resulting object is an empty `shared_ptr` object or an empty `weak_ptr` object.
7779
78-
`ptr` -- a pointer of type `Other*` to the resource to be managed. `T` must be a complete type. If the function fails (because the control block can't be allocated), it evaluates the expression `delete ptr`.
80+
`ptr`: A pointer of type `Other*` to the resource to be managed. `T` must be a complete type. If the function fails (because the control block can't be allocated), it evaluates the expression `delete ptr`.
7981
80-
`ptr, deleter` -- a pointer of type `Other*` to the resource to be managed and a deleter for that resource. If the function fails (because the control block can't be allocated), it calls `deleter(ptr)`, which must be well-defined.
82+
`ptr, deleter`: A pointer of type `Other*` to the resource to be managed and a deleter for that resource. If the function fails (because the control block can't be allocated), it calls `deleter(ptr)`, which must be well-defined.
8183
82-
`ptr, deleter, alloc` -- a pointer of type `Other*` to the resource to be managed, a deleter for that resource, and an allocator to manage any storage that must be allocated and freed. If the function fails (because the control block can't be allocated), it calls `deleter(ptr)`, which must be well-defined.
84+
`ptr, deleter, alloc`: A pointer of type `Other*` to the resource to be managed, a deleter for that resource, and an allocator to manage any storage that must be allocated and freed. If the function fails (because the control block can't be allocated), it calls `deleter(ptr)`, which must be well-defined.
8385
84-
`sp` -- a `shared_ptr<Other>` object that owns the resource to be managed.
86+
`sp`: A `shared_ptr<Other>` object that owns the resource to be managed.
8587
86-
`wp` -- a `weak_ptr<Other>` object that points to the resource to be managed.
88+
`wp`: A `weak_ptr<Other>` object that points to the resource to be managed.
8789
88-
`ap` -- an `auto_ptr<Other>` object that holds a pointer to the resource to be managed. If the function succeeds, it calls `ap.release()`; otherwise it leaves `ap` unchanged.
90+
`ap`: An `auto_ptr<Other>` object that holds a pointer to the resource to be managed. If the function succeeds, it calls `ap.release()`; otherwise it leaves `ap` unchanged.
8991
9092
In all cases, the pointer type `Other*` must be convertible to `T*`.
9193
@@ -162,7 +164,7 @@ element_type* get() const noexcept;
162164

163165
### Remarks
164166

165-
The member function returns the address of the owned resource. If the object does not own a resource, it returns 0.
167+
The member function returns the address of the owned resource. If the object doesn't own a resource, it returns 0.
166168

167169
### Example
168170

@@ -705,7 +707,7 @@ The shared pointer to swap with.
705707
706708
### Remarks
707709
708-
The member function leaves the resource originally owned by **`*this`** subsequently owned by *`sp`*, and the resource originally owned by *`sp`* subsequently owned by **`*this`**. The function does not change the reference counts for the two resources and it does not throw any exceptions.
710+
The member function leaves the resource originally owned by **`*this`** subsequently owned by *`sp`*, and the resource originally owned by *`sp`* subsequently owned by **`*this`**. The function doesn't change the reference counts for the two resources and it doesn't throw any exceptions.
709711
710712
### Example
711713

‎docs/standard-library/sub-match-class.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
description: "Learn more about: sub_match Class"
33
title: "sub_match Class"
4-
ms.date: "09/10/2018"
4+
ms.date: 06/20/2022
55
f1_keywords: ["regex/std::sub_match", "regex/std::sub_match::matched", "regex/std::sub_match::compare", "regex/std::sub_match::length", "regex/std::sub_match::str", "regex/std::sub_match::difference_type", "regex/std::sub_match::iterator", "regex/std::sub_match::value_type"]
66
helpviewer_keywords: ["std::sub_match [C++]", "std::sub_match [C++], matched", "std::sub_match [C++], compare", "std::sub_match [C++], length", "std::sub_match [C++], str", "std::sub_match [C++], difference_type", "std::sub_match [C++], iterator", "std::sub_match [C++], value_type"]
77
ms.assetid: 804e2b9e-d16a-4c4c-ac60-024e0b2dd0e8
8+
ms.custom: devdivchpfy22
89
---
10+
911
# sub_match Class
1012

1113
Describes a submatch.
@@ -27,7 +29,7 @@ The iterator type for submatches.
2729
2830
The class template describes an object that designates a sequence of characters that matched a capture group in a call to [regex_match](../standard-library/regex-functions.md#regex_match) or to [regex_search](../standard-library/regex-functions.md#regex_search). Objects of type [match_results Class](../standard-library/match-results-class.md) hold an array of these objects, one for each capture group in the regular expression that was used in the search.
2931
30-
If the capture group was not matched the object's data member `matched` holds false, and the two iterators `first` and `second` (inherited from the base `std::pair`) are equal. If the capture group was matched, `matched` holds true, the iterator `first` points to the first character in the target sequence that matched the capture group, and the iterator `second` points one position past the last character in the target sequence that matched the capture group. Note that for a zero-length match the member `matched` holds true, the two iterators will be equal, and both will point to the position of the match.
32+
If the capture group wasn't matched the object's data member `matched` holds false, and the two iterators `first` and `second` (inherited from the base `std::pair`) are equal. If the capture group was matched, `matched` holds true, the iterator `first` points to the first character in the target sequence that matched the capture group, and the iterator `second` points one position past the last character in the target sequence that matched the capture group. For a zero-length match, the member `matched` holds true, the two iterators will be equal, and both will point to the position of the match.
3133
3234
A zero-length match can occur when a capture group consists solely of an assertion, or of a repetition that allows zero repeats. For example:
3335

‎docs/standard-library/thread-class.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
description: "Learn more about: thread Class"
33
title: "thread Class"
4-
ms.date: "08/17/2021"
4+
ms.date: 06/20/2022
55
f1_keywords: ["thread/std::thread", "thread/std::thread::id Class", "thread/std::thread::thread", "thread/std::thread::detach", "thread/std::thread::get_id", "thread/std::thread::hardware_concurrency", "thread/std::thread::join", "thread/std::thread::joinable", "thread/std::thread::native_handle", "thread/std::thread::swap"]
66
helpviewer_keywords: ["std::thread [C++]", "std::thread [C++], thread", "std::thread [C++], detach", "std::thread [C++], get_id", "std::thread [C++], hardware_concurrency", "std::thread [C++], join", "std::thread [C++], joinable", "std::thread [C++], native_handle", "std::thread [C++], swap"]
7+
ms.custom: devdivchpfy22
78
---
9+
810
# `thread` Class
911

1012
Defines an object that's used to observe and manage a thread of execution within an application.
@@ -17,7 +19,7 @@ class thread;
1719

1820
## Remarks
1921

20-
You can use a `thread` object to observe and manage a thread of execution within an application. A `thread` object that's created by using the default constructor isn't associated with any thread of execution. A `thread` object that's constructed by using a callable object creates a new thread of execution and calls the callable object in that `thread`. `Thread` objects can be moved but not copied. Which is why a thread of execution can be associated with only one `thread` object.
22+
You can use a `thread` object to observe and manage a thread of execution within an application. A `thread` object that's created by using the default constructor isn't associated with any thread of execution. A `thread` object that's constructed by using a callable object creates a new thread of execution and calls the callable object in that `thread`. `Thread` objects can be moved but not copied, which is why a thread of execution can be associated with only one `thread` object.
2123

2224
Every thread of execution has a unique identifier of type `thread::id`. The function `this_thread::get_id` returns the identifier of the calling thread. The member function `thread::get_id` returns the identifier of the thread that's managed by a `thread` object. For a default-constructed `thread` object, the `thread::get_id` method returns an object that has a value that's the same for all default-constructed `thread` objects and different from the value that's returned by `this_thread::get_id` for any thread of execution that could be joined at the time of the call.
2325

@@ -97,7 +99,7 @@ static unsigned int hardware_concurrency() noexcept;
9799

98100
### Return Value
99101

100-
An estimate of the number of hardware thread contexts. If the value cannot be computed or isn't well defined, this method returns 0.
102+
An estimate of the number of hardware thread contexts. If the value can't be computed or isn't well defined, this method returns 0.
101103

102104
### Microsoft Specific
103105

‎docs/standard-library/tuple-class.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
description: "Learn more about: tuple Class"
33
title: "tuple Class"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/20/2022
55
f1_keywords: ["tuple/std::tuple", "tuple/std::tuple::operator="]
66
helpviewer_keywords: ["tuple class"]
77
ms.assetid: c38749be-ae4d-41f3-98ea-6aa3250de9a3
8+
ms.custom: devdivchpfy22
89
---
10+
911
# tuple Class
1012

1113
Wraps a fixed-length sequence of elements.

‎docs/standard-library/type-index-class.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
---
22
description: "Learn more about: type_index Class"
33
title: "type_index Class"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/20/2022
55
f1_keywords: ["typeindex/std::type_index"]
66
helpviewer_keywords: ["type_index class"]
77
ms.assetid: db366119-74cb-43e8-aacf-9679e561fa2f
8+
ms.custom: devdivchpfy22
89
---
10+
911
# type_index Class
1012

1113
The `type_index` class wraps a pointer to [type_info Class](../cpp/type-info-class.md) to assist in indexing by such objects.

‎docs/standard-library/unique-lock-class.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
description: "Learn more about: unique_lock Class"
33
title: "unique_lock Class"
4-
ms.date: "11/04/2016"
4+
ms.date: 06/20/2022
55
f1_keywords: ["mutex/std::unique_lock"]
66
ms.assetid: f4ed8ba9-c8af-446f-8ef0-0b356bad14bd
7+
ms.custom: devdivchpfy22
78
---
9+
810
# unique_lock Class
911

1012
Represents a template that can be instantiated to create objects that manage the locking and unlocking of a `mutex`.

0 commit comments

Comments
 (0)