浏览代码

COMP: Fix nested class member access

Nested classes have no special access to other members of their
enclosing class.  In cmFileCopier the nested class MatchRule must use
MatchProperties, so we grant friendship to it.
Brad King 16 年之前
父节点
当前提交
d91c5b1a07
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Source/cmFileCommand.cxx

+ 2 - 0
Source/cmFileCommand.cxx

@@ -947,6 +947,8 @@ protected:
     mode_t Permissions;
     MatchProperties(): Exclude(false), Permissions(0) {}
   };
+  struct MatchRule;
+  friend struct MatchRule;
   struct MatchRule
   {
     cmsys::RegularExpression Regex;