1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
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
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/algorithm/query/find.hpp>
12 #include <boost/fusion/algorithm/transformation/erase.hpp>
13 #include <boost/mpl/not.hpp>
14 #include <boost/type_traits/is_same.hpp>
16 namespace boost { namespace fusion
20 template <typename Sequence, typename Key>
22 : erase<Sequence, typename find<Sequence, Key>::type>
26 template <typename Key, typename Sequence>
27 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
28 inline typename result_of::erase_key<Sequence const, Key>::type
29 erase_key(Sequence const& seq)
31 return erase(seq, find<Key>(seq));