Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-02-27 10:32:35

"Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> writes:

>> > Does above 'sure' means you are going to take care about it, or you want
> me
>> > to do it?
>> It means, "yes, the header should be split." Personally I don't care
>> very much whether it gets done or not.
> If you don't care why should I.

I didn't say you should do it.

>> No such directory. And there's no test for numeric_cast in
>> libs/conversion/test.
>> > copy in libs/numeric/convertion/test)
>> So whatever you're referring to can't be a copy of something that
>> doesn't exist.
>> > could use BOOST_TEST_THROW in
>> > stead of handcrafted checks.
>> I don't know what source file you're referring to, so I can't really
>> evaluate your statement.
> What a deep analysis! Looks like we could write an article on my spelling
> errors correction.

Gennadiy, I spent ten minutes trying -- and failing -- to figure out
what you're talking about. It may just look like spelling errors to
you because you know what you meant, but to me, it was just a huge
waste of time. Your sarcasm is unwarranted. I doubt I will invest
the same amount of effort on you the next time if this is how it's

>> Is there some advantage to using BOOST_TEST_THROW? For a long time I
>> was avoiding using the test library because of instability we had
>> around release time, and because other mechanisms seemed to be easier
>> and more straightforward.
> It's your choice of course. Currently test have series of check like this:
> bool caught_exception = false;
> try { c = numeric_cast<signed char>( large_value ); }
> catch (bad_numeric_cast)
> { cout<<"caught bad_numeric_cast #1\n"; caught_exception = true; }
> BOOST_CHECK ( caught_exception );
> Instead it could be written:
> BOOST_CHECK_THROW( numeric_cast<signed char>( large_value ),
> bad_numeric_cast );
> That's all I dared to propose.

That looks like an improvement.

Dave Abrahams
Boost Consulting

Boost list run by bdawes at, gregod at, cpdaniel at, john at