PageRenderTime 17ms CodeModel.GetById 7ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/Src/Dependencies/Boost/boost/fusion/algorithm/transformation/remove.hpp

http://hadesmem.googlecode.com/
C++ Header | 35 lines | 24 code | 5 blank | 6 comment | 0 complexity | 6d86ca3e2333f4168107f56cf494a0cc MD5 | raw file
 1/*=============================================================================
 2    Copyright (c) 2001-2006 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
14namespace 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