PageRenderTime 8ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://hadesmem.googlecode.com/
C++ Header | 34 lines | 23 code | 5 blank | 6 comment | 0 complexity | 02ce7cf0485aa2929fb80675d9dc668e 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_ERASE_KEY_10022005_1851)
 8#define FUSION_ERASE_KEY_10022005_1851
 9
10#include <boost/fusion/algorithm/query/find.hpp>
11#include <boost/fusion/algorithm/transformation/erase.hpp>
12#include <boost/mpl/not.hpp>
13#include <boost/type_traits/is_same.hpp>
14
15namespace boost { namespace fusion
16{
17    namespace result_of
18    {
19        template <typename Sequence, typename Key>
20        struct erase_key
21          : erase<Sequence, typename find<Sequence, Key>::type>
22        {};
23    }
24
25    template <typename Key, typename Sequence>
26    inline typename result_of::erase_key<Sequence const, Key>::type
27    erase_key(Sequence const& seq)
28    {
29        return erase(seq, find<Key>(seq));
30    }
31}}
32
33#endif
34