⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 not_.rst

📁 C++的一个好库。。。现在很流行
💻 RST
字号:
.. Metafunctions/Logical Operations//not_ |30

not\_
=====

Synopsis
--------

.. parsed-literal::
    
    template< 
          typename F
        >
    struct not\_
    {
        typedef |unspecified| type;
    };



Description
-----------

Returns the result of *logical not* (``!``) operation on its argument.


Header
------

.. parsed-literal::
    
    #include <boost/mpl/not.hpp>
    #include <boost/mpl/logical.hpp>


Parameters
----------

+---------------+---------------------------+-----------------------------------------------+
| Parameter     | Requirement               | Description                                   |
+===============+===========================+===============================================+
| ``F``         | Nullary |Metafunction|    | Operation's argument.                         |
+---------------+---------------------------+-----------------------------------------------+


Expression semantics
--------------------

For arbitrary nullary |Metafunction| ``f``:

.. parsed-literal::

    typedef not_<f>::type r;

:Return type:
    |Integral Constant|.
 
:Semantics:
    Equivalent to 
    
    .. parsed-literal::
        
        typedef bool_< (!f::type::value) > r;

.. ..........................................................................

.. parsed-literal::

    typedef not_<f> r;

:Return type:
    |Integral Constant|.

:Semantics:
    Equivalent to 

    .. parsed-literal::
    
        struct r : not_<f>::type {};


Example
-------

.. parsed-literal::
    
    BOOST_MPL_ASSERT_NOT(( not_< true\_ > ));
    BOOST_MPL_ASSERT(( not_< false\_ > ));


See also
--------

|Metafunctions|, |Logical Operations|, |and_|, |or_|

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -