Skip to content

Commit 657753e

Browse files
authored
Add C++ Core Guidelines
This rule enforces R.3, so I've added a link to R.3 in the Core Guidelines.
1 parent c6184f0 commit 657753e

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

docs/code-quality/c26406.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ helpviewer_keywords: ["C26406"]
77
ms.assetid: 02fb8e23-1989-4e24-a5a5-e30f71d00325
88
---
99
# C26406 DONT_ASSIGN_RAW_TO_OWNER
10+
This warning enforces R.3 from the C++ Core Guidelines, see [C++ Core Guidelines R.3](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#r3-a-raw-pointer-a-t-is-non-owning) for additional information.
1011

1112
Owners are initialized from allocations or from other owners. Assigning a value from a raw pointer to an owner pointer is not allowed. Raw pointers don’t guarantee ownership transfer; there is still may be an original owner which holds the resource and will attempt to release it. Note that assigning a value from owner to a raw pointer is fine; raw pointers are valid clients to access resources, but not to manage them.
1213

0 commit comments

Comments
 (0)