🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2635

Re: string::getline() and null lines

#2635
From: Steve Clamage
Date: Sat, 18 Nov 1995 03:18
21 lines
1487 bytes
Art Kaufmann <afk@elsegundoca.attgis.com> writes:

>The following is an excerpt from the April WP, p 21-25, section
>21.1.1.10.8:
>  -- c == delim for the next available input character c(in which case the
>     input character is extracted from is, but not appended to str).
>     If the function appends no characters, it calls is.setstate(failbit),
>     which may throw ios_base::failure(27.4.4.3).

>My question is: Why indicate a failure when no characters are appended?

The wording has been modified in the September draft to say an error
is indicated when no characters have been *extracted*.


--
Steve Clamage, stephen.clamage@eng.sun.com
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <48jii0$p67@engnews1.eng.sun.com>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <48j00a$la8@rap.SanDiegoCA.ATTGIS.COM>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 18 Nov 95 03:18:26 GMT
Approved: fjh@cs.mu.oz.au
From: clamage@Eng.Sun.COM (Steve Clamage)
Newsgroups: comp.std.c++
Subject: Re: string::getline() and null lines
X-Original-Date: 18 Nov 1995 03:05:36 GMT
Organization: Sun Microsystems Inc., Mountain View, CA
Message-ID: <48jii0$p67@engnews1.eng.sun.com>
References: <48j00a$la8@rap.SanDiegoCA.ATTGIS.COM>
X-Newsreader: NN version 6.5.0 #21 (NOV)
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMK1QjeEDnX0m9pzZAQFEKQF+NTRH9wRBEd2huoQ3r8E1jmnTjngUngqU
 z9HN+eTAGP4lNpTQGYtacqQ7GMPv1KDP
 =sTYf