From: Jeremy Maitin-Shepard (jbms_at_[hidden])
Date: 2003-10-28 13:29:49
Douglas Paul Gregor <gregod_at_[hidden]> writes:
> On Tue, 28 Oct 2003, Pavel Vozenilek wrote:
>> "Douglas Paul Gregor" <gregod_at_[hidden]> wrote
>> > > Would it be also possible to add BOOST_ASSERT into I/O operations, to
>> > > protect against user errors?
>> > What would it assert? If the input cannot be accepted, the fail bit will
>> > be set.
>> This situation - it is most likely programmer error, like missing separator.
>> Just to get immediate notification of error.
> I don't entirely disagree with you in principle, but I think that the
> design of I/O streams dictates the current behavior. I really do think our
> hands are tied here.
In the case of I/O, a missing separator could be an end-user error, not
a programming error; in fact I think that is the more likely
possibility. Asserting would prevent the program from dealing with
this, which would certainly not be desirable, since the program should
be designed to deal with this case.
-- Jeremy Maitin-Shepard