home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / std / cplus / 1503 next >
Encoding:
Text File  |  1992-11-05  |  1.2 KB  |  39 lines

  1. Newsgroups: comp.std.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.091104.11104@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:11:04 GMT
  10. Lines: 27
  11.  
  12.  
  13.  
  14.  
  15. Hi,
  16.  
  17. I'd like to ask the ARM specifications regarding forward class
  18. declarations.  At what scope would the class name be entered?  
  19. The current scope or the first non-class enclosing scope?  
  20. For example:
  21.  
  22.   class A {
  23.     class B {
  24.       struct C;              // is it ::C or A::B::C ?
  25.       struct D *dP;          // likewise is it ::D or A::B::D ?
  26.       void f(struct E *eP);  // is it ::E or is it entered in
  27.                              // the local scope of f() ?
  28.     };
  29.   };
  30.   C *cP;                     // so is C visible?
  31.   E *eP;                     // and so is E?
  32.  
  33. The USL library assumes that forward class declarations are 
  34. entered in the first non-class enclosing scope. As far as I 
  35. could tell in ARM, it should be entered in the current scope.
  36. Which should it be?
  37.  
  38. Thanks for any replies
  39.