This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]