The MPL Reference Manual: not_

Front Page / Metafunctions / Logical Operations / not_

# not_

### Synopsis

    template<
          typename F
        >
    struct not_
    {
        typedef unspecified type;
    };

### Description

Returns the result of logical not (`!`) operation on its argument.

### Header

    #include <boost/mpl/not.hpp>
    #include <boost/mpl/logical.hpp>

### Parameters

Parameter | Requirement | Description
--- | --- | ---
`F` | Nullary Metafunction | Operation's argument.

### Expression semantics

For arbitrary nullary Metafunction `f`:

    typedef not_<f>::type r;

Return type: | Integral Constant.
Semantics: | Equivalent to
    typedef bool_< (!f::type::value) > r;

    typedef not_<f> r;

Return type: | Integral Constant.
Semantics: | Equivalent to
    struct r : not_<f>::type {};

### Example

    BOOST_MPL_ASSERT_NOT(( not_< true_ > ));
    BOOST_MPL_ASSERT(( not_< false_ > ));

### See also

Metafunctions, Logical Operations, `and_`, `or_`