Back to home page

EIC code displayed by LXR

 
 

    


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 // Copyright Aleksey Gurtovoy 2000-2004
0006 //
0007 // Distributed under the Boost Software License, Version 1.0. 
0008 // (See accompanying file LICENSE_1_0.txt or copy at 
0009 // http://www.boost.org/LICENSE_1_0.txt)
0010 //
0011 // See http://www.boost.org/libs/mpl for documentation.
0012 
0013 // $Id$
0014 // $Date$
0015 // $Revision$
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> // ignore
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 // BOOST_MPL_FIND_IF_HPP_INCLUDED