From 7386386299342848060 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,91e745a5e99644a9,start X-Google-Attributes: gidf78e5,public From: greghunt@zeta.org.au Subject: Is the exception behaviour of iostreams Implementation defined? Date: 1995/06/09 Message-ID: <3r85ii$a69@godzilla.zeta.org.au>#1/1 X-Deja-AN: 104053620 organization: Kralizec Dialup Unix Sydney, +61-2-837-1183 V.32bis reply-to: greghunt@zeta.org.au newsgroups: comp.std.c++ The draft at Table 72 (27-16) shows that ios_base construction sets (in some way) exceptions() to goodbit. I assume that this means that no setstate() operation on the base class will throw and exception. At 27.4.4.3 iostate exceptions() const; indicates which iostates may cause exceptions to be thrown. Elsewhere (27.6.1.2.2 para 2 for example) it says that setstate(failbit) may throw an ios_base::failure exception. Again at 27.6.1.3 para 2 basic_istream may call setstate() at eof and thus possibly throw an exception. Is the mapping between states and exceptions implementation defined? Where is it set? Personally I am not fond of file system behaviour that treats eof as an exception but I can't see how I can know in advance what the exception behaviour is going to be. Can anyone clarify this for me? Have I missed something?