1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/ossrv_pub/boost_apis/boost/mpl/replace_if.hpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,88 @@
1.4 +
1.5 +#ifndef BOOST_MPL_REPLACE_IF_HPP_INCLUDED
1.6 +#define BOOST_MPL_REPLACE_IF_HPP_INCLUDED
1.7 +
1.8 +// Copyright Aleksey Gurtovoy 2000-2004
1.9 +// Copyright John R. Bandela 2000-2002
1.10 +// Copyright David Abrahams 2003-2004
1.11 +//
1.12 +// Distributed under the Boost Software License, Version 1.0.
1.13 +// (See accompanying file LICENSE_1_0.txt or copy at
1.14 +// http://www.boost.org/LICENSE_1_0.txt)
1.15 +//
1.16 +// See http://www.boost.org/libs/mpl for documentation.
1.17 +
1.18 +// $Source: /cvsroot/boost/boost/boost/mpl/replace_if.hpp,v $
1.19 +// $Date: 2004/11/28 01:57:09 $
1.20 +// $Revision: 1.7 $
1.21 +
1.22 +#include <boost/mpl/transform.hpp>
1.23 +#include <boost/mpl/apply.hpp>
1.24 +#include <boost/mpl/if.hpp>
1.25 +#include <boost/mpl/aux_/inserter_algorithm.hpp>
1.26 +#include <boost/mpl/aux_/config/forwarding.hpp>
1.27 +
1.28 +namespace boost { namespace mpl {
1.29 +
1.30 +namespace aux {
1.31 +
1.32 +template< typename Predicate, typename T >
1.33 +struct replace_if_op
1.34 +{
1.35 + template< typename U > struct apply
1.36 +#if !defined(BOOST_MPL_CFG_NO_NESTED_FORWARDING)
1.37 + : if_<
1.38 + typename apply1<Predicate,U>::type
1.39 + , T
1.40 + , U
1.41 + >
1.42 + {
1.43 +#else
1.44 + {
1.45 + typedef typename if_<
1.46 + typename apply1<Predicate,U>::type
1.47 + , T
1.48 + , U
1.49 + >::type type;
1.50 +#endif
1.51 + };
1.52 +};
1.53 +
1.54 +
1.55 +template<
1.56 + typename Sequence
1.57 + , typename Predicate
1.58 + , typename T
1.59 + , typename Inserter
1.60 + >
1.61 +struct replace_if_impl
1.62 + : transform1_impl<
1.63 + Sequence
1.64 + , protect< aux::replace_if_op<Predicate,T> >
1.65 + , Inserter
1.66 + >
1.67 +{
1.68 +};
1.69 +
1.70 +template<
1.71 + typename Sequence
1.72 + , typename Predicate
1.73 + , typename T
1.74 + , typename Inserter
1.75 + >
1.76 +struct reverse_replace_if_impl
1.77 + : reverse_transform1_impl<
1.78 + Sequence
1.79 + , protect< aux::replace_if_op<Predicate,T> >
1.80 + , Inserter
1.81 + >
1.82 +{
1.83 +};
1.84 +
1.85 +} // namespace aux
1.86 +
1.87 +BOOST_MPL_AUX_INSERTER_ALGORITHM_DEF(4, replace_if)
1.88 +
1.89 +}}
1.90 +
1.91 +#endif // BOOST_MPL_REPLACE_IF_HPP_INCLUDED