Fix R.21 warning to cover all Shared_pointer parameters

Closes #2226
This commit is contained in:
Herb Sutter
2024-10-24 11:17:43 -07:00
parent 4e3a6f24bc
commit 5b98c70498

View File

@@ -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