Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-09-04 08:59:37


"Jonathan Turkanis" <technews_at_[hidden]> writes:

> I liked BOOST_MPL_ASSERT_IS_SAME because I didn't have to use double
> parantheses.

But you were out of luck if one of the types contained commas.

  BOOST_MPL_ASSERT_IS_SAME(T, pair<int, long>) // error!

and no amount of parenthesization could fix it.

> For the other uses now supported by BOOST_MPL_ASSERT, I
> could just use BOOST_STATIC_ASSERT.

You can always code your own ASSERT_IS_SAME.

  #define ASSERT_IS_SAME(x,y) BOOST_MPL_ASSERT((boost::is_same<x,y>))

There are too many other predicates that people want to assert to
make is_same a special case in the library.

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

Aleksey's working on the brand new documentation; the intention is to
document everything that the user can configure. If there are
particular things you want to see documented, please be specific.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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