Skip to content

Commit d7b6b49

Browse files
authored
Added C++ Core Guidelines link to C26415
The rule was already specified in the description, so I added a link to the documentation.
1 parent c6184f0 commit d7b6b49

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/code-quality/c26415.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.assetid: 4165f70a-78ae-4a03-b256-c4bd74b02d09
1111
"Smart pointer parameter is used only to access contained pointer. Use T* or T& instead."
1212

1313
**C++ Core Guidelines**:
14-
R.30: Take smart pointers as parameters only to explicitly express lifetime semantics
14+
[R.30](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#r30-take-smart-pointers-as-parameters-only-to-explicitly-express-lifetime-semantics): Take smart pointers as parameters only to explicitly express lifetime semantics
1515

1616
Using a smart pointer type to pass data to a function indicates that the target function needs to manage the lifetime of the contained object. However, if the function only uses the smart pointer to access the contained object and never actually calls any code that may lead to its deallocation (that is, never affect its lifetime), there is usually no need to complicate the interface with smart pointers. A plain pointer or reference to the contained object is preferred.
1717

0 commit comments

Comments
 (0)