Skip to content

Commit f9381a4

Browse files
authored
Add C++ Core Guidelines link to C26441
1 parent c9741f7 commit f9381a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/code-quality/c26441.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.assetid: f923c422-ed01-4644-b40b-93f15fc5bb93
1212
"Guard objects must be named."
1313

1414
**C++ Core Guidelines**:
15-
CP.44: Remember to name your lock_guards and unique_locks
15+
[CP.44](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#cp44-remember-to-name-your-lock_guards-and-unique_locks): Remember to name your lock_guards and unique_locks
1616

1717
The standard library provides a few useful classes which help to control concurrent access to resources. Objects of such types lock exclusive access for the duration of their lifetime. This implies that every lock object must be named, i.e. have clearly defined lifetime which spans through the period in which access operations are executed. So, failing to assign a lock object to a variable is a mistake which is effectively disables locking mechanism (because temporary variables are transient). This rule tries to catch simple cases of such unintended behavior.
1818

0 commit comments

Comments
 (0)