1 .. Algorithms/Querying Algorithms//find |10
17 typedef |unspecified| type;
25 Returns an iterator to the first occurrence of type ``T`` in a ``Sequence``.
33 #include <boost/mpl/find.hpp>
40 +---------------+-----------------------+-----------------------------------+
41 | Parameter | Requirement | Description |
42 +===============+=======================+===================================+
43 | ``Sequence`` | |Forward Sequence| | A sequence to search in. |
44 +---------------+-----------------------+-----------------------------------+
45 | ``T`` | Any type | A type to search for. |
46 +---------------+-----------------------+-----------------------------------+
52 For any |Forward Sequence| ``s`` and arbitrary type ``t``:
57 typedef find<s,t>::type i;
68 typedef find_if<s, is_same<_,t> >::type i;
74 Linear. At most ``size<s>::value`` comparisons for identity.
82 typedef vector<char,int,unsigned,long,unsigned long> types;
83 typedef find<types,unsigned>::type iter;
85 BOOST_MPL_ASSERT(( is_same< deref<iter>::type, unsigned > ));
86 BOOST_MPL_ASSERT_RELATION( iter::pos::value, ==, 2 );
92 |Querying Algorithms|, |contains|, |find_if|, |count|, |lower_bound|
95 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
96 Distributed under the Boost Software License, Version 1.0. (See accompanying
97 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)