From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2308afbbe4ecec0b X-Google-Attributes: gid103376,public From: Florian Weimer Subject: Re: Subverting 'Access for Sub-programs Date: 1999/08/07 Message-ID: <87vhasarmm.fsf@deneb.cygnus.stuttgart.netsurf.de>#1/1 X-Deja-AN: 509928072 References: <7ocqru$rrm$1@nnrp1.deja.com> <7of9eq$2ue$1@wanadoo.fr> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@cygnus.stuttgart.netsurf.de X-Trace: deneb.cygnus.stuttgart.netsurf.de 934016673 6085 192.168.0.1 (7 Aug 1999 09:04:33 GMT) Organization: Penguin on board Mime-Version: 1.0 User-Agent: Gnus/5.070095 (Pterodactyl Gnus v0.95) Emacs/20.4 NNTP-Posting-Date: 7 Aug 1999 09:04:33 GMT Newsgroups: comp.lang.ada Date: 1999-08-07T09:04:33+00:00 List-Id: Hyman Rosen writes: > C++ does allow you to declare a derived class inside a function, > including new member functions. This only affects visibility, but > sometimes that's what you want. There are some limitations, too. Local classes, as they are called by the standard, aren't allowed to define static data members. In additon, it is impossible to access auto variables in the enclosing function directly (you have to pass pointers and/or references, which can be dangerous, or copy the objects, which can be expensive).