Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-11-18 05:56:00

If you are tired of angle brackets in your templates (no, it's not a TV
commercial :), may be you'll like this one:

    typedef eval<
            , lambda(is_same(_,int))
>::type res;

    BOOST_STATIC_ASSERT(res::value == 2);

Or this one:

    typedef eval<
                , lambda(not_(is_float(_)))
            , lambda( or_(
                , less(sizeof_(_),sizeof_(int))
                ) )
>::type iter;

    typedef eval< is_same(iter::type,char) >::type res2;

The above actually compiles on Comeau C/C++ and Intel C++ 6.0 with
the current MPL sources in the CVS; see*checkout*/boost/boost/libs/m
pl/example/lambda2.cpp for an example. Note that the "factorial" snippet
there doesn't work yet (if you ask 'fact::value', it will blow).


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