Boost logo

Boost :

Subject: Re: [boost] Is there interest in unit testing both passing and failing BOOST_MPL_ASSERTs?
From: Ben Robinson (icaretaker_at_[hidden])
Date: 2011-09-16 03:18:51


On Thu, Sep 15, 2011 at 9:17 AM, Dave Abrahams <dave_at_[hidden]> wrote:

>
> > BOOST_MPL_ASSERT(sizof(T) == 0);
>
> No you don't :-)
>
> That shouldn't compile under any circumstances. BOOST_MPL_ASSERT takes
> a parenthesized type, not an integral constant expression, as an
> argument.
>
> BOOST_MPL_ASSERT((mpl::equal_to<int_<sizeof(T)>, int_<0> >))
>
> might work.
>
> Sorry for the typo. I meant:

BOOST_MPL_ASSERT_MSG(sizeof(T) == 0, INFORMATIVE_NAME, (T));

> --
> Dave Abrahams
> BoostPro Computing
> http://www.boostpro.com
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


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