1 .. Sequences/Intrinsic Metafunctions//is_sequence
16 typedef |unspecified| type;
24 Returns a boolean |Integral Constant| ``c`` such that ``c::value == true`` if and
25 only if ``X`` is a model of |Forward Sequence|.
33 #include <boost/mpl/is_sequence.hpp>
39 +---------------+-------------------+-----------------------------------------------+
40 | Parameter | Requirement | Description |
41 +===============+===================+===============================================+
42 | ``X`` | Any type | The type to query. |
43 +---------------+-------------------+-----------------------------------------------+
52 typedef is_sequence<X>::type c;
55 Boolean |Integral Constant|.
62 typedef not_< is_same< begin<T>::type,void_ > >::type c;
69 Amortized constant time.
79 BOOST_MPL_ASSERT_NOT(( is_sequence< std::vector<int> > ));
80 BOOST_MPL_ASSERT_NOT(( is_sequence< int > ));
81 BOOST_MPL_ASSERT_NOT(( is_sequence< int& > ));
82 BOOST_MPL_ASSERT_NOT(( is_sequence< UDT > ));
83 BOOST_MPL_ASSERT_NOT(( is_sequence< UDT* > ));
84 BOOST_MPL_ASSERT(( is_sequence< range_c<int,0,0> > ));
85 BOOST_MPL_ASSERT(( is_sequence< list<> > ));
86 BOOST_MPL_ASSERT(( is_sequence< list<int> > ));
87 BOOST_MPL_ASSERT(( is_sequence< vector<> > ));
88 BOOST_MPL_ASSERT(( is_sequence< vector<int> > ));
94 |Forward Sequence|, |begin|, |end|, |vector|, |list|, |range_c|
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)