]> git.sesse.net Git - casparcg/blob - dependencies/boost/boost/fusion/algorithm/transformation/remove.hpp
Manually merged pull request #222
[casparcg] / dependencies / boost / boost / fusion / algorithm / transformation / remove.hpp
1 /*=============================================================================
2     Copyright (c) 2001-2011 Joel de Guzman
3
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_07162005_0818)
8 #define FUSION_REMOVE_07162005_0818
9
10 #include <boost/fusion/view/filter_view/filter_view.hpp>
11 #include <boost/mpl/not.hpp>
12 #include <boost/type_traits/is_same.hpp>
13
14 namespace boost { namespace fusion
15 {
16     namespace result_of
17     {
18         template <typename Sequence, typename T>
19         struct remove
20         {
21             typedef filter_view<Sequence, mpl::not_<is_same<mpl::_, T> > > type;
22         };
23     }
24
25     template <typename T, typename Sequence>
26     inline typename result_of::remove<Sequence const, T>::type
27     remove(Sequence const& seq)
28     {
29         typedef typename result_of::remove<Sequence const, T>::type result_type;
30         return result_type(seq);
31     }
32 }}
33
34 #endif
35