|
Boost : |
From: larsbj_at_[hidden]
Date: 2001-10-16 14:19:40
Thomas Matelich <toms-mailing-lists_at_[hidden]> writes:
| larsbj_at_[hidden] wrote:
|
| > Thomas Matelich <toms-mailing-lists_at_[hidden]> writes:
| >
| > | I don't know your code, but I know that I use lexical_cast a lot, and around me people use RedHat's and Mandrake's unofficial
| > | g++'s. I tend to go by the Pragmatic Programmer rule: "select Isn't Broken" and check my code first. My first guess is always
| > | that check for eof() because too often I send text with 2 "words" in to be cast as, say, an int. This causes an exception.
| >
| > This might be the cause for the excepiton that I see, _but_ the
| > exception is not possible to catch since it seems that a second
| > exception is thrown during stack unwinding or something.
| >
| > try {
| > lexica_cast<...>(...);
| > }
| > catch (...) {
| > cout << "exception never caught" << endl;
| > }
| >
| > when using strstream I do not have this problem.
|
| That is peculiar, do you have a small test case?
(all below for sstream released with gcc < 3)
Not really, but I belive it is the same as I have seen ealier with
stringstream:
stringstream used for input _and_ output at the same time does not
behave properly.
other than that istringstream and ostringstream work just dandy.
From the lyx code I have this snippet:
// Now we should have the whole layout in ss
// we should now be able to give this to the
// caption inset.
ss << "\\end_inset\n";
// This seems like a bug in stringstream.
// We really should be able to use ss
// directly. (Lgb)
istringstream is(ss.str());
| Personally, we have our own copy of boost that we merge new releases
| into and maintain our local eccentricities.
ditto here.
-- Lgb
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk