3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/contains.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Algorithms / Querying Algorithms / contains |
template<
typename Sequence
, typename T
>
struct[contains](./contains.html){
typedef_unspecified_type;
};
Returns a true-valued Integral Constant if one or more elements in Sequence are identical to T.
#include <[boost/mpl/contains.hpp](../../../../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](./contains.html)<s,t>::type r;
| Return type: |
| | Semantics: |
Equivalent to
typedef[not\_](./not.html)< is_same<[find](./find.html)<s,t>::type
,[end](./end.html)<s>::type
> >::type r;
|
Linear. At most size<s>::value comparisons for identity.
typedef[vector](./vector.html)<char,int,unsigned,long,unsigned long> types;[BOOST\_MPL\_ASSERT\_NOT](./assert-not.html)(([contains](./contains.html)<types,bool> ));
Querying Algorithms, find, find_if, count, lower_bound
| Prev Next | Back Along | Up Home | Full TOC |
Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |