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