Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

is_sequence

Description

Metafunction that evaluates to mpl::true_ if a certain type T is a conforming Fusion Sequence, mpl::false_ otherwise. This may be specialized to accomodate clients which provide Fusion conforming sequences.

Synopsis

namespace traits
{
    template <typename T>
    struct is_sequence 
    {
        typedef unspecified type;
    };
}

Parameters

Parameter Requirement Description
T Any type The type to query.

Expression Semantics

typedef traits::is_sequence<T>::type c;

Return type: An MPL Boolean Constant.

Semantics: Metafunction that evaluates to mpl::true_ if a certain type T is a conforming Fusion sequence, mpl::false_ otherwise.

Header

#include <boost/fusion/support/is_sequence.hpp>

Example

BOOST_MPL_ASSERT_NOT(( traits::is_sequence< std::vector<int> > ));
BOOST_MPL_ASSERT_NOT(( is_sequence< int > ));
BOOST_MPL_ASSERT(( traits::is_sequence<list<> > ));
BOOST_MPL_ASSERT(( traits::is_sequence<list<int> > ));
BOOST_MPL_ASSERT(( traits::is_sequence<vector<> > ));
BOOST_MPL_ASSERT(( traits::is_sequence<vector<int> > ));
Copyright © 2001-2007 Joel de Guzman, Dan Marsden, Tobias Schwinger

PrevUpHomeNext