Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the develop branch, built from commit 36319504d5.
PrevUpHomeNext

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.


PrevUpHomeNext