not_.rst

来自「Boost provides free peer-reviewed portab」· RST 代码 · 共 101 行

RST
101
字号
.. Metafunctions/Logical Operations//not_ |30.. Copyright Aleksey Gurtovoy, David Abrahams 2007... Distributed under the Boost.. Software License, Version 1.0. (See accompanying.. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)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 + =
减小字号Ctrl + -
显示快捷键?