Skip to content

Commit 5eb0b58

Browse files
committed
Merge pull request #612 from tlanc007/R.3_609
R.3_609: changed owner<T> to owner<T*> in R.3 per issue #609
2 parents 8e82f0a + c3e45c9 commit 5eb0b58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CppCoreGuidelines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7232,7 +7232,7 @@ We can fix that problem by making ownership explicit:
72327232
class X2 {
72337233
// ...
72347234
public:
7235-
owner<T> p; // OK: p is owning
7235+
owner<T*> p; // OK: p is owning
72367236
T* q; // OK: q is not owning
72377237
};
72387238

@@ -7256,9 +7256,9 @@ Some interfaces cannot be simply annotated with `owner` because they need to rem
72567256

72577257
##### Note
72587258

7259-
`owner<T>` has no default semantics beyond `T*`. It can be used without changing any code using it and without affecting ABIs.
7259+
`owner<T*>` has no default semantics beyond `T*`. It can be used without changing any code using it and without affecting ABIs.
72607260
It is simply a indicator to programmers and analysis tools.
7261-
For example, if an `owner<T>` is a member of a class, that class better have a destructor that `delete`s it.
7261+
For example, if an `owner<T*>` is a member of a class, that class better have a destructor that `delete`s it.
72627262

72637263
##### Example, bad
72647264

0 commit comments

Comments
 (0)