home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / std / cplus / 1079 < prev    next >
Encoding:
Text File  |  1992-08-12  |  958 b   |  34 lines

  1. Path: sparky!uunet!elroy.jpl.nasa.gov!swrinde!news.dell.com!math.utexas.edu!ut-emx!emx.cc.utexas.edu
  2. From: jamshid@emx.cc.utexas.edu (Jamshid Afshar)
  3. Newsgroups: comp.std.c++
  4. Subject: 'inline' in friend declaration legal?
  5. Message-ID: <77601@ut-emx.uucp>
  6. Date: 13 Aug 92 00:51:58 GMT
  7. Sender: jamshid@ut-emx.uucp
  8. Organization: The University of Texas at Austin; Austin, Texas
  9. Lines: 23
  10.  
  11. I believe the following is legal:
  12.  
  13.    inline void foo();
  14.    class X {
  15.       friend void foo();
  16.    };
  17.    main() { foo(); return 0; }
  18.    inline void foo() {}
  19.  
  20. , but is 'inline' allowed in a friend declaration?
  21.  
  22.    class X {
  23.       inline friend void foo();  // is 'inline' legal?
  24.    };
  25.    main() { foo(); return 0; }
  26.    inline void foo() {}
  27.  
  28. BC++ 3.1 says no, but I think it's a compiler bug.  cfront and others
  29. apparently allow it.  Can someone who is good with grammars confirm
  30. this bug, please?  Post or e-mail and I'll post.
  31.  
  32. Thanks, Jamshid Afshar
  33. jamshid@emx.utexas.edu
  34.