1.. Metafunctions/Logical Operations//not_ |30 2 3not\_ 4===== 5 6Synopsis 7-------- 8 9.. parsed-literal:: 10 11 template< 12 typename F 13 > 14 struct not\_ 15 { 16 typedef |unspecified| type; 17 }; 18 19 20 21Description 22----------- 23 24Returns the result of *logical not* (``!``) operation on its argument. 25 26 27Header 28------ 29 30.. parsed-literal:: 31 32 #include <boost/mpl/not.hpp> 33 #include <boost/mpl/logical.hpp> 34 35 36Parameters 37---------- 38 39+---------------+---------------------------+-----------------------------------------------+ 40| Parameter | Requirement | Description | 41+===============+===========================+===============================================+ 42| ``F`` | Nullary |Metafunction| | Operation's argument. | 43+---------------+---------------------------+-----------------------------------------------+ 44 45 46Expression semantics 47-------------------- 48 49For arbitrary nullary |Metafunction| ``f``: 50 51.. parsed-literal:: 52 53 typedef not_<f>::type r; 54 55:Return type: 56 |Integral Constant|. 57 58:Semantics: 59 Equivalent to 60 61 .. parsed-literal:: 62 63 typedef bool_< (!f::type::value) > r; 64 65.. .......................................................................... 66 67.. parsed-literal:: 68 69 typedef not_<f> r; 70 71:Return type: 72 |Integral Constant|. 73 74:Semantics: 75 Equivalent to 76 77 .. parsed-literal:: 78 79 struct r : not_<f>::type {}; 80 81 82Example 83------- 84 85.. parsed-literal:: 86 87 BOOST_MPL_ASSERT_NOT(( not_< true\_ > )); 88 BOOST_MPL_ASSERT(( not_< false\_ > )); 89 90 91See also 92-------- 93 94|Metafunctions|, |Logical Operations|, |and_|, |or_| 95 96 97.. copyright:: Copyright � 2001-2009 Aleksey Gurtovoy and David Abrahams 98 Distributed under the Boost Software License, Version 1.0. (See accompanying 99 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 100