<<<<<<< .working ======= >>>>>>> .merge-right.r57125
Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
<<<<<<< .working

is_sequence

Description

=======
Description
>>>>>>> .merge-right.r57125

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.

<<<<<<< .working

Synopsis

=======
Synopsis
>>>>>>> .merge-right.r57125
namespace traits
{
    template <typename T>
    struct is_sequence
    {
        typedef unspecified type;
    };
}
<<<<<<< .working

Parameters

=======
Parameters
>>>>>>> .merge-right.r57125

Parameter

Requirement

Description

T

Any type

The type to query.

<<<<<<< .working

Expression =======

Expression >>>>>>> .merge-right.r57125 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.

<<<<<<< .working

Header

=======
Header
>>>>>>> .merge-right.r57125
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/include/is_sequence.hpp>
<<<<<<< .working

Example

=======
Example
>>>>>>> .merge-right.r57125
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> > ));

PrevUpHomeNext