Front Page / Algorithms / Querying Algorithms / contains |
Returns a true-valued Integral Constant if one or more elements in Sequence are identical to T.
#include <boost/mpl/contains.hpp>
Parameter | Requirement | Description |
---|---|---|
Sequence | Forward Sequence | A sequence to be examined. |
T | Any type | A type to search for. |
For any Forward Sequence s and arbitrary type t:
typedef contains<s,t>::type r;
Return type: | |
---|---|
Semantics: | Equivalent to typedef not_< is_same< find<s,t>::type , end<s>::type > >::type r; |
Linear. At most size<s>::value comparisons for identity.
typedef vector<char,int,unsigned,long,unsigned long> types; BOOST_MPL_ASSERT_NOT(( contains<types,bool> ));