# not_equal_to

### Synopsis

    template<
          typename T1
        , typaname T2
        >
    struct not_equal_to
    {
        typedef unspecified type;
    };

### Description

Returns `true_c` if `T1::value != T2::value` and `false_c` otherwise [1].

### Definition

    #include "boost/mpl/comparison/not_equal_to.hpp"

### Parameters

Parameter | Requirement | Description
--- | --- | ---
`T1, T2` | A model of Integral Constant |

### Expression semantics

Expression | Expression type | Precondition | Semantics | Postcondition
--- | --- | --- | --- | ---
`typedef not_equal_to<t1,t2>::type c;` | A model of `bool` Integral Constant |  | Equivalent to `typedef bool_c<(t1::value != t2::value)> c;` |

### Complexity

Amortized constant time.

### Example

    typedef list_c<int,1,5,0,7,5,-1,2,4,5> numbers;
    typedef remove_if< numbers, not_equal_to<_,int_c<5> > >::type fives;
    BOOST_STATIC_ASSERT(equal_to< count_if< fives, equal_to<_,int_c<5> > >::type, size<fives>::type >::type::value));

### Notes

[1] The `not_equal_to` metafunction can be (and is expected to be) specialized by user to work on user-defined types that do not satisfy the Integral Constant requirements. The requirements listed here are the ones imposed by the default implementation.

### See also

Metafunctions, `equal_to`, `less`, `less_equal`, `greater`, `greater_equal`

Table of Content | Reference
Last edited July 17, 2002 4:14 am