2
#ifndef BOOST_MPL_REMOVE_IF_HPP_INCLUDED
3
#define BOOST_MPL_REMOVE_IF_HPP_INCLUDED
5
// + file: boost/mpl/remove_if.hpp
6
// + last modified: 10/mar/03
8
// Copyright (c) 2000-03
11
// Permission to use, copy, modify, distribute and sell this software
12
// and its documentation for any purpose is hereby granted without fee,
13
// provided that the above copyright notice appears in all copies and
14
// that both the copyright notice and this permission notice appear in
15
// supporting documentation. No representations are made about the
16
// suitability of this software for any purpose. It is provided "as is"
17
// without express or implied warranty.
19
// See http://www.boost.org/libs/mpl for documentation.
21
#include "boost/mpl/fold_backward.hpp"
22
#include "boost/mpl/clear.hpp"
23
#include "boost/mpl/apply_if.hpp"
24
#include "boost/mpl/push_front.hpp"
25
#include "boost/mpl/identity.hpp"
26
#include "boost/mpl/protect.hpp"
27
#include "boost/mpl/lambda.hpp"
28
#include "boost/mpl/aux_/void_spec.hpp"
35
template< typename Pred > struct remove_if_helper
37
template< typename Sequence, typename U > struct apply
39
typedef typename apply_if<
40
typename apply1<Pred,U>::type
42
, push_front<Sequence,U>
49
BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN
52
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence)
53
, typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate)
58
typedef typename lambda<Predicate>::type pred_;
61
typedef typename fold_backward<
63
, typename clear<Sequence>::type
64
, protect< aux::remove_if_helper<pred_> >
68
BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END
70
BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, remove_if)
75
#endif // BOOST_MPL_REMOVE_IF_HPP_INCLUDED