|  | Home | Libraries | People | FAQ | More | 
Finds the first element of a given type within a sequence.
template< typename T, typename Sequence > typenameresult_of::find<Sequence const, T>::type find(Sequence const& seq); template< typename T, typename Sequence > typenameresult_of::find<Sequence, T>::type find(Sequence& seq);
Table 1.55. Parameters
| Parameter | Requirement | Description | 
|---|---|---|
| 
                       | A model of Forward Sequence | The sequence to search | 
| 
                       | Any type | The type to search for | 
find<T>(seq)
            Return type: A model of the same iterator
            category as the iterators of seq.
          
            Semantics: Returns an iterator to the
            first element of seq
            of type T, or end(seq)find_if<boost::is_same<_, T> >(seq)
            Linear. At most result_of::size<Sequence>::value
#include <boost/fusion/algorithm/query/find.hpp> #include <boost/fusion/include/find.hpp>
constvector<char,int> vec('a','0'); assert(*find<int>(vec) == '0'); assert(find<double>(vec) ==end(vec));