home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / cplus / 13216 < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.1 KB  |  28 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!stanford.edu!lucid.com!lucid.com!jss
  3. From: jss@lucid.com (Jerry Schwarz)
  4. Subject: Re: istrstream
  5. Message-ID: <1992Sep2.181103.1577@lucid.com>
  6. Sender: usenet@lucid.com
  7. Reply-To: jss@lucid.com (Jerry Schwarz)
  8. Organization: Lucid, Inc.
  9. References:  <1992Sep1.225259.1533@Warren.MENTORG.COM>
  10. Date: Wed, 2 Sep 92 18:11:03 GMT
  11. Lines: 15
  12.  
  13. In article <1992Sep1.225259.1533@Warren.MENTORG.COM>, adk@Warren.MENTORG.COM (Ajay Kamdar) writes:
  14. |> Why do istrstream constructors take a char* instead of a const char* ?
  15. |> This either stops me from reading a formatted input string (which I get
  16. |> as a const char*) as an istrstream, or compels me to cast away the const
  17. |> on the string when constructing the istrstream.
  18. |> 
  19.  
  20. Because strstreambuf only has a char* constructor.  The next question
  21. is obviously why strstreambuf has this limitation, and the answer
  22. is that the interface was designed before you could overload on
  23. "const".  It was an oversight that I never updated the interface.
  24. This oversight has been corrected in the x3j16 proposal.
  25.  
  26.   -- Jerry Schwarz
  27.  
  28.