home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / std / cplus / 2098 next >
Encoding:
Text File  |  1993-01-21  |  1.8 KB  |  42 lines

  1. Newsgroups: comp.std.c++
  2. Path: sparky!uunet!mcsun!julienas!jussieu!shiva.jussieu.fr!kriss
  3. From: kriss@trot.ibp.fr (Christophe GROSJEAN)
  4. Subject: Re: stringize preprocessing operator?
  5. In-Reply-To: steve@taumet.com's message of Tue, 19 Jan 1993 18:17:41 GMT
  6. Message-ID: <KRISS.93Jan21114643@trot.ibp.fr>
  7. Sender: news@jussieu.fr (Le Facteur)
  8. Nntp-Posting-Host: trot.ibp.fr
  9. Reply-To: grosjean@masi.ibp.fr
  10. Organization: Laboratoire MASI, Paris, France.
  11. References: <1993Jan18.192417.16933@digi.lonestar.org> <1993Jan19.181741.4779@taumet.com>
  12. Date: Thu, 21 Jan 1993 10:46:43 GMT
  13. Lines: 27
  14.  
  15. In article <1993Jan19.181741.4779@taumet.com> steve@taumet.com (Steve Clamage) writes:
  16.  
  17.    Preprocessing in C++ is supposed to be the same as in Standard C
  18.    (except for // comments).  The ARM tries to say that, and the
  19.    C++ Standard will make it so.
  20.  
  21. By the way, does anybody ever thought of the problems that occurs between
  22. preprocessors macros and templates.
  23.  
  24. If I define a macro that use *a type* as an argument, whenever I use
  25. templates with multiple arguments in this macro, I have a problem :
  26. the problem is coma. It's the *only* valid argument separator for
  27. macros !
  28. Isn't it time to betterize the standard C++ preprocessor.
  29. Usefull features would be :
  30.     1 - changing separator for a macro
  31.     2 - enable macro overloading,    you can do it with functions,
  32.     why not with macros ? I don't ask for typed arguments,
  33.     (it would be stupid), but for the number of arguments.
  34.     3 - compile time vars, in order to save and restore contexts in macro
  35.     it could be something like #define inside macros.
  36.     this last one would be *very* usefull, but I think it's a dream.
  37.  
  38. However, the other 2 enhancement, seems sensible.
  39. Yet, there is another way to bypass my problem : taking care of templates
  40. *before* macros. If this were the case, my problem wouldn't occurs
  41. any more.
  42.