1 .. Sequences/Intrinsic Metafunctions//empty
16 typedef |unspecified| type;
24 Returns an |Integral Constant| ``c`` such that ``c::value == true`` if
25 and only if the sequence is empty.
33 #include <boost/mpl/empty.hpp>
39 |Tag Dispatched Metafunction|
45 +---------------+-----------------------+-----------------------------------+
46 | Parameter | Requirement | Description |
47 +===============+=======================+===================================+
48 | ``Sequence`` | |Forward Sequence| | A sequence to test. |
49 +---------------+-----------------------+-----------------------------------+
55 For any |Forward Sequence| ``s``:
60 typedef empty<s>::type c;
63 Boolean |Integral Constant|.
66 Equivalent to ``typedef is_same< begin<s>::type,end<s>::type >::type c;``.
69 ``empty<s>::value == ( size<s>::value == 0 )``.
76 Amortized constant time.
84 typedef range_c<int,0,0> empty_range;
85 typedef vector<long,float,double> types;
87 BOOST_MPL_ASSERT( empty<empty_range> );
88 BOOST_MPL_ASSERT_NOT( empty<types> );
94 |Forward Sequence|, |Integral Constant|, |size|, |begin| / |end|
97 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
98 Distributed under the Boost Software License, Version 1.0. (See accompanying
99 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)