PageRenderTime 72ms CodeModel.GetById 66ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://hadesmem.googlecode.com/
C++ Header | 32 lines | 21 code | 5 blank | 6 comment | 0 complexity | 584346398a8007fa6c18a6683a51d9d8 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_FILTER_IF_07172005_0818)
 8#define FUSION_FILTER_IF_07172005_0818
 9
10#include <boost/fusion/view/filter_view/filter_view.hpp>
11
12namespace boost { namespace fusion
13{
14    namespace result_of
15    {
16        template <typename Sequence, typename Pred>
17        struct filter_if
18        {
19            typedef filter_view<Sequence, Pred> type;
20        };
21    }
22    
23    template <typename Pred, typename Sequence>
24    inline typename result_of::filter_if<Sequence const, Pred>::type
25    filter_if(Sequence const& seq)
26    {
27        return filter_view<Sequence const, Pred>(seq);
28    }
29}}
30
31#endif
32