]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/fusion/include/boost/fusion/algorithm/transformation/filter.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / fusion / include / boost / fusion / algorithm / transformation / filter.hpp
1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
3 Copyright (c) 2005-2006 Dan Marsden
4
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(FUSION_FILTER_02122005_1839)
9 #define FUSION_FILTER_02122005_1839
10
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/view/filter_view/filter_view.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 filter
21 {
22 typedef filter_view<Sequence, 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::filter<Sequence const, T>::type
29 filter(Sequence const& seq)
30 {
31 return filter_view<const Sequence, is_same<mpl::_, T> >(seq);
32 }
33 }}
34
35 #endif
36