This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [RFC/Patch] What about using seekoff(-1, ...) for unbuffered underflow?
On Fri, Jun 06, 2003 at 09:19:04PM -0700, Nathan Myers wrote:
> > + _M_buf(NULL), _M_buf_size(BUFSIZ), _M_buf_allocated(false),
>
> > + this->setg(NULL, NULL, NULL);
>
> > + this->setg(NULL, NULL, NULL);
>
> We don't use NULL much in C++.
"We"?
> A literal 0 suffices. I think the
> next standard will introduce a distinguished value that may be
> converted to any (but only a) pointer type, and it might be named
> NULL. Until then it only risks confusion, because if NULL is
> accidentally passed to a function expecting (e.g.) an int, you get
> no warning, but the code looks like it's really passing a pointer.
Since the code /is/ using pointers, all the more reason to use NULL.
--
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace. We seek
not your counsel, nor your arms. Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen. - Samuel Adams
- References:
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbufferedunderflow?
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbuffered underflow?
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbufferedunderflow?
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbufferedunderflow?
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbufferedunderflow?
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbufferedunderflow?
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbufferedunderflow?
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbufferedunderflow?
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbufferedunderflow?
- Re: [RFC/Patch] What about using seekoff(-1, ...) for unbuffered underflow?