Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2003-09-05 15:29:23


Jaakko Jarvi wrote:
> > How about:
>
> > boost::mpl::bool_<!A::value>
>
> > ?
>
> No, we do not want to unwrap A (by A::value), then rewrap the result
> using bool_.
> This came up with enable_if where many boosters wanted to be able to
> say something like:
>
> enable_if<mpl::not_<is_integral<T> >, ...>::type instead of
> enable_if<!is_integral<T>::value, ...>::type

Assuming that the latter version is spelled 'enable_if_c', making the former
work is as simple as

template< typename C, ... >
struct enable_if
    : enable_if_c<C::value, ...>
{
};

>
> Now we just want to know whether not_ is part of MPL's public interface.

It is.

Aleksey


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