Boost provides free peer-reviewed portable C++ source libraries. We emphasize libraries that work

源代码在线查看: end.rst

软件大小: 35482 K
上传用户: sinba
关键词: libraries peer-reviewed emphasize provides
下载地址: 免注册下载 普通下载 VIP

相关代码

				.. Sequences/Intrinsic Metafunctions//end								.. 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)								end				===								Synopsis				--------								.. parsed-literal::				    				    template				          typename X				        >				    struct end				    {				        typedef |unspecified| type;				    };																Description				-----------								Returns the sequence's past-the-end iterator. If the argument is not a 				|Forward Sequence|, returns |void_|.												Header				------								.. parsed-literal::				    				    #include 												Model of				--------								|Tag Dispatched Metafunction|												Parameters				----------								+---------------+-------------------+-----------------------------------------------+				| Parameter     | Requirement       | Description                                   |				+===============+===================+===============================================+				| ``X``         | Any type          | A type whose end iterator, if any, will be    |				|               |                   | returned.                                     |				+---------------+-------------------+-----------------------------------------------+												Expression semantics				--------------------								For any arbitrary type ``x``:								.. parsed-literal::								    typedef end::type last; 								:Return type:				    |Forward Iterator| or |void_|.								:Semantics:				    If ``x`` is |Forward Sequence|, ``last`` is an iterator pointing one past the 				    last element in ``s``; otherwise ``last`` is |void_|.								:Postcondition:				    If ``last`` is an iterator, it is past-the-end. 												Complexity				----------								Amortized constant time.												Example				-------								.. parsed-literal::				    				    typedef vector v;				    typedef begin::type first;				    typedef end::type last;								    BOOST_MPL_ASSERT(( is_same< next::type, last > ));												See also				--------								|Iterators|, |Forward Sequence|, |begin|, |end|, |next|							

相关资源