1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #if !defined(FUSION_REMOVE_IF_07162005_0818)
8 #define FUSION_REMOVE_IF_07162005_0818
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/view/filter_view/filter_view.hpp>
12 #include <boost/mpl/not.hpp>
13 #include <boost/type_traits/is_same.hpp>
15 namespace boost { namespace fusion
19 template <typename Sequence, typename Pred>
22 typedef filter_view<Sequence, mpl::not_<Pred> > type;
26 template <typename Pred, typename Sequence>
27 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
28 inline typename result_of::remove_if<Sequence const, Pred>::type
29 remove_if(Sequence const& seq)
31 typedef typename result_of::remove_if<Sequence const, Pred>::type result_type;
32 return result_type(seq);