From 5b98c70498b7e4e3f41bc392ada98f6e4e1c2cac Mon Sep 17 00:00:00 2001 From: Herb Sutter Date: Thu, 24 Oct 2024 11:17:43 -0700 Subject: [PATCH] Fix R.21 warning to cover all Shared_pointer parameters Closes #2226 --- CppCoreGuidelines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CppCoreGuidelines.md b/CppCoreGuidelines.md index 2da43fc4f..65052dc2c 100644 --- a/CppCoreGuidelines.md +++ b/CppCoreGuidelines.md @@ -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. ### R.22: Use `make_shared()` to make `shared_ptr`s