🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: gnu.g++.lib.bug
3 messages
3 total messages Started by Jason Merrill Sun, 12 Apr 1992 07:26
iostream missing operator>>(istream&,streambuf*)
#64
Author: Jason Merrill
Date: Sun, 12 Apr 1992 07:26
7 lines
639 bytes
I'm not sure exactly what this is supposed to do, but the Borland C++
iostream implementation includes it, and the NIHCL 3.0 expects it to be
there.

--
Jason Merrill
jason@jarthur.claremont.edu
Re: iostream missing operator>>(istream&,streambuf*)
#66
Author: bothner
Date: Mon, 13 Apr 1992 05:12
24 lines
912 bytes
Try the following:

istream& operator>>(istream& is, register streambuf* sbuf)
{
    if (is.ipfx0()) {
	register streambuf* inbuf = is.rdbuf();
	// FIXME: Should optimize!
	for (;;) {
	    register int ch = inbuf->sbumpc();
	    if (ch == EOF) {
		is.set(ios::eofbit);
		break;
	    }
	    if (sbuf->sputc(ch) == EOF) {
		is.set(ios::failbit);
		break;
	    }
	}
    }
    return is;
}

	--Per Bothner
Cygnus Support     bothner@cygnus.com
Re: iostream missing operator>>(istream&,streambuf*)
#68
Author: Fool on a Pedestal
Date: Mon, 13 Apr 1992 20:36
12 lines
762 bytes
>>>>> On Mon, 13 Apr 92 12:12:30 -0700, bothner@cygnus.com said:

> Try the following:

> istream& operator>>(istream& is, register streambuf* sbuf)
...

OK, now how about istream& get(streambuf&, char = '\n')?

--
Jason Merrill
jason@jarthur.claremont.edu
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads