]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/fusion/algorithm/transformation/remove.hpp
update sources to v12.2.3
[ceph.git] / ceph / src / 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/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>
14
15 namespace boost { namespace fusion
16 {
17 namespace result_of
18 {
19 template <typename Sequence, typename T>
20 struct remove
21 {
22 typedef filter_view<Sequence, mpl::not_<is_same<mpl::_, T> > > type;
23 };
24 }
25
26 template <typename T, typename Sequence>
27 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
28 inline typename result_of::remove<Sequence const, T>::type
29 remove(Sequence const& seq)
30 {
31 typedef typename result_of::remove<Sequence const, T>::type result_type;
32 return result_type(seq);
33 }
34 }}
35
36 #endif
37