[Patch] Allow setbuf(_s, 1)

Paolo Carlini pcarlini@unitus.it
Wed Jun 18 16:51:00 GMT 2003


Benjamin Kosnik wrote:

>>>2003-06-17  Nathan C. Myers  <ncm-nospam@cantrip.org>
>>>	    Paolo Carlini  <pcarlini@unitus.it>
>>>
>>>	* include/bits/fstream.tcc (setbuf): Allow (__s, 1) too,
>>>	simply equivalent to the unbuffered case (0, 0).
>>>      
>>>
>Looks fine, but can't you just do
>
>+      else if (__s && __n)
>
Seems to me less safe, since streamsize is a *signed* type...
(mind libstdc++/11095? ;)

Paolo.



More information about the Libstdc++ mailing list