Skip to content

Commit 2e76ff1

Browse files
author
Colin Robertson
committed
Acrolinx shared_ptr
1 parent c3288d7 commit 2e76ff1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ no arguments -- the resulting object is an empty `shared_ptr` object or an empty
7878
7979
`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 cannot be allocated), it calls `deleter(ptr)`, which must be well defined.
8080
81-
`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.
81+
`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.
8282
8383
`sp` -- a `shared_ptr<Other>` object that owns the resource to be managed.
8484
8585
`wp` -- a `weak_ptr<Other>` object that points to the resource to be managed.
8686
87-
`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.
87+
`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.
8888
8989
In all cases, the pointer type `Other*` must be convertible to `T*`.
9090
@@ -161,7 +161,7 @@ element_type* get() const noexcept;
161161

162162
### Remarks
163163

164-
The member function returns the address of the owned resource. If the object does not own a resource it returns 0.
164+
The member function returns the address of the owned resource. If the object does not own a resource, it returns 0.
165165

166166
### Example
167167

@@ -303,7 +303,7 @@ The type of the deleter of the owned object, stored for later deletion of the ob
303303
304304
### Remarks
305305
306-
The operators all decrement the reference count for the resource currently owned by `*this` and assign ownership of the resource named by the operand sequence to `*this`. If the reference count falls to zero, the resource is released. If an operator fails it leaves `*this` unchanged.
306+
The operators all decrement the reference count for the resource currently owned by `*this` and assign ownership of the resource named by the operand sequence to `*this`. If the reference count falls to zero, the resource is released. If an operator fails, it leaves `*this` unchanged.
307307
308308
### Example
309309
@@ -436,7 +436,7 @@ The allocator to copy.
436436

437437
### Remarks
438438

439-
The operators all decrement the reference count for the resource currently owned by `*this` and assign ownership of the resource named by the operand sequence to `*this`. If the reference count falls to zero, the resource is released. If an operator fails it leaves `*this` unchanged.
439+
The operators all decrement the reference count for the resource currently owned by `*this` and assign ownership of the resource named by the operand sequence to `*this`. If the reference count falls to zero, the resource is released. If an operator fails, it leaves `*this` unchanged.
440440

441441
### Example
442442

0 commit comments

Comments
 (0)