home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13431 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.6 KB  |  42 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!taumet!steve
  3. From: steve@taumet.com (Steve Clamage)
  4. Subject: Re: defining cast operators outside classes
  5. Message-ID: <1992Sep9.161513.27698@taumet.com>
  6. Organization: TauMetric Corporation
  7. References: <TMB.92Sep7162324@arolla.idiap.ch> <1992Sep8.173613.25113@taumet.com> <TMB.92Sep8215104@arolla.idiap.ch>
  8. Date: Wed, 9 Sep 1992 16:15:13 GMT
  9. Lines: 31
  10.  
  11. tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
  12.  
  13. |In article <1992Sep8.173613.25113@taumet.com> steve@taumet.com (Steve Clamage) writes:
  14.  
  15. |   tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
  16.  
  17. |   >Apparently, it is impossible to define a conversion operator for a
  18. |   >class without making the conversion operator a member function.
  19.  
  20. |   In the case of some operators you run the risk of having legal code
  21. |   with different meanings depending on whether the operator declaration
  22. |   is visible.
  23.  
  24. |Why is the C++ committee suddenly so concerned with my well-being?
  25. |Those people who feel that such a feature is dangerous simply don't
  26. |define conversion operators outside their classes.
  27.  
  28. This is not sudden, and not the action of the C++ committee.  The
  29. rule is in the ARM, and predates the formation of the committee.
  30. I was presenting a rationale for the rule, with which you are free
  31. to disagree.
  32.  
  33. You are also free to submit a proposal to the C++ committee to change
  34. the language in this regard.  Guidelines on how to create and submit
  35. such a proposal have been published in various places.  You could also
  36. join the committee and argue your viewpoints more directly.
  37.  
  38. -- 
  39.  
  40. Steve Clamage, TauMetric Corp, steve@taumet.com
  41. Vice Chair, ANSI C++ Committee, X3J16
  42.