From d62fc39a44472445ce24deeaa59913e442a11dbd Mon Sep 17 00:00:00 2001 From: mnatsuhara <46756417+mnatsuhara@users.noreply.github.com> Date: Thu, 10 Jun 2021 15:18:21 -0700 Subject: [PATCH] correct "friend class" syntax --- docs/cpp/friend-cpp.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/cpp/friend-cpp.md b/docs/cpp/friend-cpp.md index 08537bf0edf..7a907527843 100644 --- a/docs/cpp/friend-cpp.md +++ b/docs/cpp/friend-cpp.md @@ -44,14 +44,14 @@ friend F; The first form introduces a new class F if no existing class by that name was found in the innermost namespace. **C++11**: The second form does not introduce a new class; it can be used when the class has already been declared, and it must be used when declaring a template type parameter or a typedef as a friend. -Use `class friend F` when the referenced type has not yet been declared: +Use `friend class F` when the referenced type has not yet been declared: ```cpp namespace NS { class M { - class friend F; // Introduces F but doesn't define it + friend class F; // Introduces F but doesn't define it }; } ```