File indexing completed on 2025-12-16 09:57:25
0001
0002 #ifndef BOOST_MPL_FIND_IF_HPP_INCLUDED
0003 #define BOOST_MPL_FIND_IF_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/aux_/find_if_pred.hpp>
0018 #include <boost/mpl/arg.hpp>
0019 #include <boost/mpl/iter_fold_if.hpp>
0020 #include <boost/mpl/aux_/common_name_wknd.hpp>
0021 #include <boost/mpl/aux_/na_spec.hpp>
0022 #include <boost/mpl/aux_/lambda_support.hpp>
0023
0024 namespace boost { namespace mpl {
0025
0026 BOOST_MPL_AUX_COMMON_NAME_WKND(find_if)
0027
0028 template<
0029 typename BOOST_MPL_AUX_NA_PARAM(Sequence)
0030 , typename BOOST_MPL_AUX_NA_PARAM(Predicate)
0031 >
0032 struct find_if
0033 {
0034 typedef typename iter_fold_if<
0035 Sequence
0036 , void
0037 , mpl::arg<1>
0038 , protect< aux::find_if_pred<Predicate> >
0039 >::type result_;
0040
0041 typedef typename second<result_>::type type;
0042
0043 BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find_if,(Sequence,Predicate))
0044 };
0045
0046 BOOST_MPL_AUX_NA_SPEC(2,find_if)
0047
0048 }}
0049
0050 #endif