Skip to content

Commit 73ffc8a

Browse files
author
mikeblome
committed
fixes 771
1 parent c0fdd99 commit 73ffc8a

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

docs/cpp/friend-cpp.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "friend (C++)"
3-
ms.date: "11/19/2018"
3+
ms.date: "07/15/2019"
44
f1_keywords: ["friend_cpp"]
55
helpviewer_keywords: ["member access, from friend functions", "friend classes [C++]", "friend keyword [C++]"]
66
ms.assetid: 8fe9ee55-d56f-40cd-9075-d9fb1375aff4
@@ -214,7 +214,7 @@ int main() {
214214
215215
Friendship is not mutual unless explicitly specified as such. In the above example, member functions of `YourClass` cannot access the private members of `YourOtherClass`.
216216
217-
A managed type cannot have any friend functions, friend classes, or friend interfaces.
217+
A managed type (in C++/CLI) cannot have any friend functions, friend classes, or friend interfaces.
218218
219219
Friendship is not inherited, meaning that classes derived from `YourOtherClass` cannot access `YourClass`'s private members. Friendship is not transitive, so classes that are friends of `YourOtherClass` cannot access `YourClass`'s private members.
220220
@@ -225,9 +225,7 @@ Implications of friend relationship
225225
226226
## Inline friend definitions
227227
228-
Friend functions can be defined inside class declarations. These functions are inline functions, and like member inline functions they behave as though they were defined immediately after all class members have been seen but before the class scope is closed (the end of the class declaration).
229-
230-
Friend functions defined inside class declarations are not considered in the scope of the enclosing class; they are in file scope.
228+
Friend functions can be defined (given a function body) inside class declarations. These functions are inline functions, and like member inline functions they behave as though they were defined immediately after all class members have been seen but before the class scope is closed (the end of the class declaration). Friend functions that are defined inside class declarations are in the scope of the enclosing class.
231229
232230
## See also
233231

0 commit comments

Comments
 (0)