1.. Sequences/Views//empty_sequence 2 3empty_sequence 4============== 5 6Synopsis 7-------- 8 9.. parsed-literal:: 10 11 struct empty_sequence 12 { 13 // |unspecified| 14 // |...| 15 }; 16 17 18Description 19----------- 20 21Represents a sequence containing no elements. 22 23 24Header 25------ 26 27.. parsed-literal:: 28 29 #include <boost/mpl/empty_sequence.hpp> 30 31 32Expression semantics 33-------------------- 34 35|Semantics disclaimer...| |Random Access Sequence|. 36 37In the following table, ``s`` is an instance of ``empty_sequence``. 38 39+-------------------------------+-----------------------------------------------------------+ 40| Expression | Semantics | 41+===============================+===========================================================+ 42| ``empty_sequence`` | An empty |Random Access Sequence|. | 43+-------------------------------+-----------------------------------------------------------+ 44| ``size<s>::type`` | ``size<s>::value == 0``; see |Random Access Sequence|. | 45+-------------------------------+-----------------------------------------------------------+ 46 47 48Example 49------- 50 51.. parsed-literal:: 52 53 typedef begin<empty_sequence>::type first; 54 typedef end<empty_sequence>::type last; 55 56 BOOST_MPL_ASSERT(( is_same<first,last> )); 57 BOOST_MPL_ASSERT_RELATION( size<empty_sequence>::value, ==, 0 ); 58 59 typedef transform_view< 60 empty_sequence 61 , add_pointer<_> 62 > empty_view; 63 64 BOOST_MPL_ASSERT_RELATION( size<empty_sequence>::value, ==, 0 ); 65 66 67See also 68-------- 69 70|Sequences|, |Views|, |vector|, |list|, |single_view| 71 72 73.. copyright:: Copyright � 2001-2009 Aleksey Gurtovoy and David Abrahams 74 Distributed under the Boost Software License, Version 1.0. (See accompanying 75 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 76