Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Nested class Accessibility
  • From: Ming Cheng <chengm349@xxxxxxxxxxx>
  • Date: Fri, 29 May 2020 08:15:18 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=J1QYO//n4LddPkZOaPje8goqjsb5FZjLPBjPffrXDuA=; b=Cb7343atAK/c7hE0IYXB9o3aWreLET/gzazoxIteaPkpEvKosLbgQXNzUwlnpjtLqGS+JaNmy12lAl9ctv06i217LVtUlyQUNyemyICgrIaEgE7uT6y3NNml6eP8/j8L8Z6hy1F73Zm4gr5Sxa9yBTOWr8v7dmiSu5gVW0uJ6lVy2rhqONLBYU9wWtaIzo9x/nlYm7D6CcU5jJ510ViSlIeDttwj7AUrnJ9pf1i0MjoO5HQbNX1VjYOLVmARWxxNRlZO4MbTH1qReiAY29jn6lLCzZU8GMrpnWSBxs2IiItH7WTHlBXaP7S81FyOVUivPrEMyobpth56cR/MTGf9bw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J8oog77Ai7CmIHFFym6cSY+9ti37yjPMQUfrs1opkVdnFALGLuQ/XNeyjuqNwXhQanP7uROIJPsemX51gzv61n21cUyR2gCEaUaMUmtQIBfRKY1dSXVdyi0PEc0gilXPsFbO+LuLS5SebP7l7wOIWpZiMvywhwwsWWaJueZJ4oMvUDdKkmudPva2QZIenLWWETZ5y7uwqMttNXI2TuV0tGg82r2a//DkAiIAp0wm1Q/gobgW9uxJQSJ19ukvwq7TYO8BKUp0KOdlXYjbXcXCOA+ZPL3gsSUV9ReXzlVzK3kW4l4AdBE9gBoIFCJOF8c4rCwHnnTfh3iNx4ijtVtASQ==
  • Delivered-to: cdt-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/cdt-dev>
  • List-help: <mailto:cdt-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHWNY/J/7o3vP3IjkS6Qf7dBRATMQ==
  • Thread-topic: Nested class Accessibility

Hi,

Assume I have this class definition:

class Enclosing {      
   private:   
       int x;
     
   /* start of Nested class declaration */  
   class Nested {
      int y;   
      void NestedFun(Enclosing *e) {
        cout<<e->x;  // works fine: nested class can access 
                     // private members of Enclosing class
      }       
   }; // declaration Nested class ends here
}; // declaration Enclosing class ends here
  
Now ASTVisitor will give me callback "public int visit(IASTDeclaration decl)" for class Enclosing and later Nested. How can I get class Nested's accessibility within Enclosing? 

Thanks.
Ming

Back to the top