Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-11-11 19:35:10


Did you open the output stream with the flag ios::binary?
  "Austin Bingham" <austin.bingham_at_[hidden]> wrote in message news:bf1abd10511111347t18a76856i5c44b45bcb1dedfc_at_mail.gmail.com...
  I've run into a situation where I'm triggering an assertion at basic_binary_oprimitive::save_binary(). This is on basic_binary_oprimitive.hpp, line 115 in version 1.32. This assertion seems to be claiming that an output stream will always be in a "good" state after a call to write(). On it's face, I think there's no way to safely make that claim, especially about a stream whose type is a template parameter. In fact, as I understand it, good()'s whole purpose is to let you know that the stream is busted.

  I think its the opposite.

  Am I misunderstanding something, or should that assert be changed to an exception?

  Wit this problem you'll get an exception later in any case but its more obvious to trap it here
  when you're debugging.

  I'm trying to get an example program that demonstrates this problem. Currently, the code that exercises it is big and hairy, and I haven't pared down the precise conditions that cause it to happen. I can provide a stack trace, however, which may be of some use.
  --
  Austin Bingham

  "If I were creating the world I wouldn't mess about
  with butterflies and daffodils. I would have started
  with lasers, eight o'clock, Day One!"
  Evil

------------------------------------------------------------------------------

  _______________________________________________
  Boost-users mailing list
  Boost-users_at_[hidden]
  http://lists.boost.org/mailman/listinfo.cgi/boost-users



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net