1<?xml version="1.0" encoding="utf-8" ?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 4<head> 5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 6<meta name="generator" content="Docutils 0.7: http://docutils.sourceforge.net/" /> 7<title>The MPL Reference Manual: not_</title> 8<link rel="stylesheet" href="../style.css" type="text/css" /> 9</head> 10<body class="docframe refmanual"> 11<table class="header"><tr class="header"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./or.html" class="navigation-link">Prev</a> <a href="./bitwise-operations.html" class="navigation-link">Next</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./or.html" class="navigation-link">Back</a> Along</span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Up</a> <a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td> 12<td class="header-group page-location"><a href="../refmanual.html" class="navigation-link">Front Page</a> / <a href="./metafunctions.html" class="navigation-link">Metafunctions</a> / <a href="./logical-operations.html" class="navigation-link">Logical Operations</a> / <a href="./not.html" class="navigation-link">not_</a></td> 13</tr></table><div class="header-separator"></div> 14<div class="section" id="not"> 15<h1><a class="toc-backref" href="./logical-operations.html#id1552">not_</a></h1> 16<div class="section" id="id1082"> 17<h3><a class="subsection-title" href="#synopsis" name="synopsis">Synopsis</a></h3> 18<pre class="literal-block"> 19template< 20 typename F 21 > 22struct <a href="./not.html" class="identifier">not_</a> 23{ 24 typedef <em>unspecified</em> type; 25}; 26</pre> 27</div> 28<div class="section" id="id1083"> 29<h3><a class="subsection-title" href="#description" name="description">Description</a></h3> 30<p>Returns the result of <em>logical not</em> (<tt class="literal"><span class="pre">!</span></tt>) operation on its argument.</p> 31</div> 32<div class="section" id="id1084"> 33<h3><a class="subsection-title" href="#header" name="header">Header</a></h3> 34<pre class="literal-block"> 35#include <<a href="../../../../boost/mpl/not.hpp" class="header">boost/mpl/not.hpp</a>> 36#include <<a href="../../../../boost/mpl/logical.hpp" class="header">boost/mpl/logical.hpp</a>> 37</pre> 38</div> 39<div class="section" id="id1085"> 40<h3><a class="subsection-title" href="#parameters" name="parameters">Parameters</a></h3> 41<table border="1" class="docutils table"> 42<colgroup> 43<col width="17%" /> 44<col width="30%" /> 45<col width="53%" /> 46</colgroup> 47<thead valign="bottom"> 48<tr><th class="head">Parameter</th> 49<th class="head">Requirement</th> 50<th class="head">Description</th> 51</tr> 52</thead> 53<tbody valign="top"> 54<tr><td><tt class="literal"><span class="pre">F</span></tt></td> 55<td>Nullary <a class="reference internal" href="./metafunction.html">Metafunction</a></td> 56<td>Operation's argument.</td> 57</tr> 58</tbody> 59</table> 60</div> 61<div class="section" id="id1086"> 62<h3><a class="subsection-title" href="#expression-semantics" name="expression-semantics">Expression semantics</a></h3> 63<p>For arbitrary nullary <a class="reference internal" href="./metafunction.html">Metafunction</a> <tt class="literal"><span class="pre">f</span></tt>:</p> 64<pre class="literal-block"> 65typedef <a href="./not.html" class="identifier">not_</a><f>::type r; 66</pre> 67<table class="docutils field-list" frame="void" rules="none"> 68<col class="field-name" /> 69<col class="field-body" /> 70<tbody valign="top"> 71<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p> 72</td> 73</tr> 74<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p> 75<pre class="last literal-block"> 76typedef <a href="./bool.html" class="identifier">bool_</a>< (!f::type::value) > r; 77</pre> 78</td> 79</tr> 80</tbody> 81</table> 82<!-- .......................................................................... --> 83<pre class="literal-block"> 84typedef <a href="./not.html" class="identifier">not_</a><f> r; 85</pre> 86<table class="docutils field-list" frame="void" rules="none"> 87<col class="field-name" /> 88<col class="field-body" /> 89<tbody valign="top"> 90<tr class="field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="./integral-constant.html">Integral Constant</a>.</p> 91</td> 92</tr> 93<tr class="field"><th class="field-name">Semantics:</th><td class="field-body"><p class="first">Equivalent to</p> 94<pre class="last literal-block"> 95struct r : <a href="./not.html" class="identifier">not_</a><f>::type {}; 96</pre> 97</td> 98</tr> 99</tbody> 100</table> 101</div> 102<div class="section" id="id1087"> 103<h3><a class="subsection-title" href="#example" name="example">Example</a></h3> 104<pre class="literal-block"> 105<a href="./assert-not.html" class="identifier">BOOST_MPL_ASSERT_NOT</a>(( <a href="./not.html" class="identifier">not_</a>< <a href="./bool.html" class="identifier">true_</a> > )); 106<a href="./assert.html" class="identifier">BOOST_MPL_ASSERT</a>(( <a href="./not.html" class="identifier">not_</a>< <a href="./bool.html" class="identifier">false_</a> > )); 107</pre> 108</div> 109<div class="section" id="id1088"> 110<h3><a class="subsection-title" href="#see-also" name="see-also">See also</a></h3> 111<p><a class="reference internal" href="./metafunctions.html">Metafunctions</a>, <a class="reference internal" href="./logical-operations.html">Logical Operations</a>, <a class="reference internal" href="./and.html">and_</a>, <a class="reference internal" href="./or.html">or_</a></p> 112</div> 113</div> 114 115<div class="footer-separator"></div> 116<table class="footer"><tr class="footer"><td class="header-group navigation-bar"><span class="navigation-group"><a href="./or.html" class="navigation-link">Prev</a> <a href="./bitwise-operations.html" class="navigation-link">Next</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./or.html" class="navigation-link">Back</a> Along</span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./logical-operations.html" class="navigation-link">Up</a> <a href="../refmanual.html" class="navigation-link">Home</a></span><span class="navigation-group-separator"> | </span><span class="navigation-group"><a href="./refmanual_toc.html" class="navigation-link">Full TOC</a></span></td> 117<td><div class="copyright-footer"><div class="copyright">Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams</div> 118Distributed under the Boost Software License, Version 1.0. (See accompanying 119file LICENSE_1_0.txt or copy at <a class="reference external" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)</div></td></tr></table></body> 120</html> 121