| Home | Libraries | People | FAQ | More

### negation

    template<class T>
    struct negation
        : public integral_constant<bool, !bool(T::value)> { };

Inherits: Inherits from `integral_constant<bool, !bool(T::value)>`.

Header: `#include <boost/type_traits/negation.hpp>`

Compiler Compatibility: All current compilers are supported by this trait.

Examples:

> `negation<true_type>` inherits from `false_type`.

> `negation<false_type>` inherits from `true_type`.

> `negation<integral_constant<int, 4> >::type` is the type `false_type`.

> `negation<integral_constant<int, 0> >::value` is an integral constant expression that evaluates to true.

> `negation<T>::value_type` is the type `bool`.