empty_sequence.rst
来自「Boost provides free peer-reviewed portab」· RST 代码 · 共 76 行
RST
76 行
.. Sequences/Views//empty_sequence.. 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)empty_sequence==============Synopsis--------.. parsed-literal:: struct empty_sequence { // |unspecified| // |...| };Description-----------Represents a sequence containing no elements.Header------.. parsed-literal:: #include <boost/mpl/empty_sequence.hpp>Expression semantics--------------------|Semantics disclaimer...| |Random Access Sequence|.In the following table, ``s`` is an instance of ``empty_sequence``.+-------------------------------+-----------------------------------------------------------+| Expression | Semantics |+===============================+===========================================================+| ``empty_sequence`` | An empty |Random Access Sequence|. |+-------------------------------+-----------------------------------------------------------+| ``size<s>::type`` | ``size<s>::value == 0``; see |Random Access Sequence|. |+-------------------------------+-----------------------------------------------------------+Example-------.. parsed-literal:: typedef begin<empty_sequence>::type first; typedef end<empty_sequence>::type last; BOOST_MPL_ASSERT(( is_same<first,last> )); BOOST_MPL_ASSERT_RELATION( size<empty_sequence>::value, ==, 0 ); typedef transform_view< empty_sequence , add_pointer<_> > empty_view; BOOST_MPL_ASSERT_RELATION( size<empty_sequence>::value, ==, 0 );See also--------|Sequences|, |Views|, |vector|, |list|, |single_view|
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?