...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
template< typename T > struct is_sequence { typedef unspecified type; };
Returns an Integral Constant c
such that c::value == true
if and only if T
is a model of Sequence.
#include "boost/mpl/is_sequence.hpp"
Parameter | Requirement | Description |
---|---|---|
T | A type |
Expression | Expression type | Precondition | Semantics | Postcondition |
---|---|---|---|---|
typedef is_sequence<T>::type c; | A model of bool Integral Constant | Equivalent to typedef not_< is_same< begin<T>::type,void_ > >::type c; |
Amortized constant time.
struct UDT {}; BOOST_STATIC_ASSERT( !is_sequence<int>::value ); BOOST_STATIC_ASSERT( !is_sequence<UDT>::value ); BOOST_STATIC_ASSERT( is_sequence< list<> >::value ); BOOST_STATIC_ASSERT( is_sequence< vector<> >::value );
Sequence, begin
, end
, as_sequence