home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 15816 < prev    next >
Encoding:
Text File  |  1992-11-04  |  1.2 KB  |  40 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!nuscc!arthur
  3. From: arthur@solomon.technet.sg (Arthur Sombrito)
  4. Subject: forward class declarations
  5. Message-ID: <1992Nov5.091843.12243@nuscc.nus.sg>
  6. Sender: usenet@nuscc.nus.sg
  7. Organization: National University of Singapore
  8. X-Newsreader: TIN [version 1.1 PL6]
  9. Date: Thu, 5 Nov 1992 09:18:43 GMT
  10. Lines: 28
  11.  
  12.  
  13.  
  14.  
  15.  
  16. Hi,
  17.  
  18. I'd like to ask the ARM specifications regarding forward class
  19. declarations.  At what scope would the class name be entered?  
  20. The current scope or the first non-class enclosing scope?  
  21. For example:
  22.  
  23.   class A {
  24.     class B {
  25.       struct C;              // is it ::C or A::B::C ?
  26.       struct D *dP;          // likewise is it ::D or A::B::D ?
  27.       void f(struct E *eP);  // is it ::E or is it entered in
  28.                              // the local scope of f() ?
  29.     };
  30.   };
  31.   C *cP;                     // so is C visible?
  32.   E *eP;                     // and so is E?
  33.  
  34. The USL library assumes that forward class declarations are 
  35. entered in the first non-class enclosing scope. As far as I 
  36. could tell in ARM, it should be entered in the current scope.
  37. Which should it be?
  38.  
  39. Thanks for any replies
  40.