3rdParty/boost/1.78.0/libs/mpl/doc/refmanual/find.html
| Prev Next | Back Along | Up Home | Full TOC | Front Page / Algorithms / Querying Algorithms / find |
template<
typename Sequence
, typename T
>
struct[find](./find.html){
typedef_unspecified_type;
};
Returns an iterator to the first occurrence of type T in a Sequence.
#include <[boost/mpl/find.hpp](../../../../boost/mpl/find.hpp)>
| Parameter | Requirement | Description |
|---|---|---|
| Sequence | Forward Sequence | A sequence to search in. |
| T | Any type | A type to search for. |
For any Forward Sequence s and arbitrary type t:
typedef[find](./find.html)<s,t>::type i;
| Return type: |
| | Semantics: |
Equivalent to
typedef[find\_if](./find-if.html)<s, is_same<_,t> >::type i;
|
Linear. At most size<s>::value comparisons for identity.
typedef[vector](./vector.html)<char,int,unsigned,long,unsigned long> types;
typedef[find](./find.html)<types,unsigned>::type iter;[BOOST\_MPL\_ASSERT](./assert.html)(( is_same<[deref](./deref.html)<iter>::type, unsigned > ));[BOOST\_MPL\_ASSERT\_RELATION](./assert-relation.html)( iter::pos::value, ==, 2 );
Querying Algorithms, contains, 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) |