Skip to content

Commit

Permalink
Fix R.21 warning to cover all Shared_pointer parameters
Browse files Browse the repository at this point in the history
Closes #2226
  • Loading branch information
hsutter committed Oct 24, 2024
1 parent 4e3a6f2 commit 5b98c70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CppCoreGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -9879,7 +9879,7 @@ This is more efficient:

##### Enforcement

(Simple) Warn if a function uses a `Shared_pointer` with an object allocated within the function, but never returns the `Shared_pointer` or passes it to a function requiring a `Shared_pointer&`. Suggest using `unique_ptr` instead.
(Simple) Warn if a function uses a `Shared_pointer` with an object allocated within the function, but never returns the `Shared_pointer` or passes it to a function requiring a `Shared_pointer`. Suggest using `unique_ptr` instead.

### <a name="Rr-make_shared"></a>R.22: Use `make_shared()` to make `shared_ptr`s

Expand Down

0 comments on commit 5b98c70

Please sign in to comment.