Skip to content

Commit 5709b4d

Browse files
author
Colin Robertson
authored
Touch ups
Fix Acrolinx grammar and style issues.
1 parent 1ae7147 commit 5709b4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/code-quality/c26411.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: C26411
3-
ms.date: 11/15/2017
3+
ms.date: 08/19/2020
44
ms.topic: "conceptual"
55
f1_keywords: ["C26411"]
66
helpviewer_keywords: ["C26411"]
@@ -14,7 +14,7 @@ When you pass a unique pointer to a function by reference, it implies that its r
1414

1515
- The limitations from the warning [C26410](C26410.md) are also applicable here.
1616

17-
- The heuristic to detect `release` or `reset` access to the unique pointer is naive. We only detect calls to assignment operators and to functions named `reset` (case-insensitive). Obviously, this detection doesn't cover all possible cases of smart pointer modifications. (For example, it doesn't detect `std::swap`, or any special non-**`const`** function in a custom smart pointer). We expect this warning may produce many false positives on custom types, and in some scenarios dealing with standard unique pointers. The heuristic will be improved as we implement more checks focused on smart pointers.
17+
- The heuristic to detect `release` or `reset` access to the unique pointer is naive. We only detect calls to assignment operators and to functions named `reset` (case-insensitive). Obviously, this detection doesn't cover all possible cases of smart pointer modifications. (For example, it doesn't detect `std::swap`, or any special non-**`const`** function in a custom smart pointer). We expect this warning may produce many false positives on custom types, and in some scenarios dealing with standard unique pointers. We expect to improve the heuristic as we implement more checks focused on smart pointers.
1818

1919
- The fact that smart pointers are often templates brings an interesting limitation. The compiler isn't required to process template code in templates if it's not used. In code that makes limited use of smart pointer interfaces, the checker may produce unexpected results. The checker can't properly identify semantics of the template type, because some functions may never get used. For the standard `std::unique_ptr`, this limitation is mitigated by recognizing the type's name. This may be extended in future to cover more well-known smart pointers.
2020

0 commit comments

Comments
 (0)