Boost logo

Boost :

From: Brock Peabody (brock.peabody_at_[hidden])
Date: 2003-09-05 14:26:06


> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
> On Behalf Of Jaakko Jarvi
> Sent: Friday, September 05, 2003 1:06 PM
> To: boost_at_[hidden]
> Subject: [boost] MPL not_ etc. questions
>
> Hi,
>
> We're writing enable_if docs and have a question about MPL. The docs
> do not seem to mention metafunctions like not_ or and_; we can find
> logical_not, logical_and, etc. which seem to be applying to functions,
> not values.
>
> So assuming we have:
>
> class A { static const bool value = true; };
>
> What is the right way to get the inverse of A::value as an MPL wrapped
> boolean?
>
> Is it boost::mpl::not_<A> or something else?

How about:

   boost::mpl::bool_<!A::value>

?


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