Update contrib.
2 #ifndef BOOST_MPL_SWITCH_HPP_INCLUDED
3 #define BOOST_MPL_SWITCH_HPP_INCLUDED
5 // Copyright Aleksey Gurtovoy 2003-2004
7 // Distributed under the Boost Software License, Version 1.0.
8 // (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
11 // See http://www.boost.org/libs/mpl for documentation.
13 // $Source: /cvsroot/boost/boost/boost/mpl/switch.hpp,v $
14 // $Date: 2004/09/02 15:40:42 $
17 #include <boost/mpl/find_if.hpp>
18 #include <boost/mpl/deref.hpp>
19 #include <boost/mpl/lambda.hpp>
20 #include <boost/mpl/apply.hpp>
21 #include <boost/mpl/pair.hpp>
22 #include <boost/mpl/aux_/na_spec.hpp>
23 #include <boost/mpl/aux_/lambda_support.hpp>
25 namespace boost { namespace mpl {
28 typename BOOST_MPL_AUX_NA_PARAM(Body)
29 , typename BOOST_MPL_AUX_NA_PARAM(T)
33 typedef typename find_if<
35 , apply1< lambda< first<_1> >, T >
38 typedef typename deref<iter_>::type pair_;
39 typedef typename lambda< typename second<pair_>::type >::type f_;
40 typedef typename apply1<f_,T>::type type;
42 BOOST_MPL_AUX_LAMBDA_SUPPORT(2,switch_,(Body,T))
45 BOOST_MPL_AUX_NA_SPEC(2, switch_)
49 #endif // BOOST_MPL_SWITCH_HPP_INCLUDED