Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2005-02-26 20:19:13


> > 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.

> >> >> 3. Doesn't numeric_cast facility shouldn't be deprecated?
> >> ^^^^^^^ ^^^^^^^^^
> >> ?? Double negative??
> >>
> >> Its implementation should be replaced by one that uses the Boost
> >> Numeric Conversion Library.
> >
> > I think just include boost/numeric/cast.hpp will work.
>
> No such file. Maybe boost/numeric/conversion/cast.hpp?
>
> > And test program should be deprecated either.
>
> You can't use "either" that way. You could say
>
> And the test program should be deprecated too.
>
> or
>
> And the test program shouldn't be deprecated either.
>
> But they mean completely different things. I can't tell which of
> these you mean (or if you mean one of them at all).
>
> > BTW I noticed that this test (either original in
> > libs/convertion/test or
> ^
>
> 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.

> 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.

> >> > 4. Shouldn't polymorphic_downcast work for references?
> >>
> >> I have no opinion.
> >
> > In a book you have this in exercises. And I do not see why not?
>
> Is that a question?

No. This an opinion.

> --
> Dave Abrahams

 Gennadiy


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk