Boost logo

Boost :

From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-09-03 12:41:39


"Aleksey Gurtovoy" <agurtovoy_at_[hidden]> wrote in message:

> MPL changelog for 1.32 release
> ******************************

>
> 1. Nullary metafunction classes are no longer special-cased, and
> are *not* identical to nullary metafunctions:
>
> +-------------------------+---------------+---------------------------+
> | Nullary... | Before | Now |
> +=========================+===============+===========================+
> | metafunction | ``f::type`` | ``f::type`` |
> +-------------------------+---------------+---------------------------+
> | metafunction class | ``c::type`` | ``c::apply<>::type`` or |
> | | | ``c::apply::type`` [1]_ |
> +-------------------------+---------------+---------------------------+

Great! This asymmetry has bothered me for a long time.

> 4. ``<boost/mpl/assert_is_same.hpp>`` header has been replaced by a more
> general ``<mpl/assert.hpp>``; the new asserts provide a significantly
> higher-quality diagnostics. See the table below for the new equivalents of
> the old macros:
>
>
+-------------------------------------------+-----------------------------------
------------------+
> | Before | Now
|
>
+===========================================+===================================
==================+
> | ``BOOST_MPL_ASSERT_IS_SAME(t1, t2)`` | ``BOOST_MPL_ASSERT((
boost::is_same<t1,t2> ))`` |
>
+-------------------------------------------+-----------------------------------
------------------+
> | ``BOOST_MPL_ASSERT_IS_NOT_SAME(t1, t2)`` | ``BOOST_MPL_ASSERT_NOT((
boost::is_same<t1,t2> ))`` |
>
+-------------------------------------------+-----------------------------------
------------------+

I liked BOOST_MPL_ASSERT_IS_SAME because I didn't have to use double
parantheses. For the other uses now supported by BOOST_MPL_ASSERT, I could just
use BOOST_STATIC_ASSERT.

BTW, I remember that the reference documentation on boost consulting (or
somewhere) used to include documentation of some important macros. Why not add
this to the main docs?

Best Regards,
Jonathan


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