You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/code-quality/c26409.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,3 +35,24 @@ void f(int i)
35
35
auto unique = std::make_unique<int[]>(i); // prefer using smart pointers over new and delete
36
36
}
37
37
```
38
+
39
+
There is a C++ idiom `delete this` that triggers this warning. The warning is intentional as this pattern is discouraged by the C++ Core Guidelines. The warning can be suppressed using the `gsl::suppress` attribute in such cases. See the example below.
0 commit comments