1 .. Algorithms/Querying Algorithms//min_element |80
13 , typename Pred = less<_1,_2>
17 typedef |unspecified| type;
25 Returns an iterator to the smallest element in ``Sequence``.
33 #include <boost/mpl/min_element.hpp>
39 +---------------+-------------------------------+-----------------------------------+
40 | Parameter | Requirement | Description |
41 +===============+===============================+===================================+
42 |``Sequence`` | |Forward Sequence| | A sequence to be searched. |
43 +---------------+-------------------------------+-----------------------------------+
44 | ``Pred`` | Binary |Lambda Expression| | A comparison criteria. |
45 +---------------+-------------------------------+-----------------------------------+
51 For any |Forward Sequence| ``s`` and binary |Lambda Expression| ``pred``:
55 typedef min_element<s,pred>::type i;
61 ``i`` is the first iterator in |begin/end<s>| such that for every iterator ``j``
66 apply< pred, deref<j>::type, deref<i>::type >::type::value == false
73 Linear. Zero comparisons if ``s`` is empty, otherwise exactly ``size<s>::value - 1``
82 typedef vector<bool,char[50],long,double> types;
84 transform_view< types,sizeof_<_1> >
87 BOOST_MPL_ASSERT(( is_same< deref<iter::base>::type, bool> ));
93 |Querying Algorithms|, |max_element|, |find_if|, |upper_bound|, |find|
96 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
97 Distributed under the Boost Software License, Version 1.0. (See accompanying
98 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)