Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:43

0001 
0002 #ifndef BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
0003 #define BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2003-2004
0006 // Copyright David Abrahams 2003-2004
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. 
0009 // (See accompanying file LICENSE_1_0.txt or copy at 
0010 // http://www.boost.org/LICENSE_1_0.txt)
0011 //
0012 // See http://www.boost.org/libs/mpl for documentation.
0013 
0014 // $Id$
0015 // $Date$
0016 // $Revision$
0017 
0018 #include <boost/mpl/erase_key_fwd.hpp>
0019 #include <boost/mpl/map/aux_/has_key_impl.hpp>
0020 #include <boost/mpl/map/aux_/item.hpp>
0021 #include <boost/mpl/map/aux_/tag.hpp>
0022 #include <boost/mpl/identity.hpp>
0023 #include <boost/mpl/base.hpp>
0024 #include <boost/mpl/eval_if.hpp>
0025 
0026 #include <boost/type_traits/is_same.hpp>
0027 
0028 namespace boost { namespace mpl {
0029 
0030 template<>
0031 struct erase_key_impl< aux::map_tag >
0032 {
0033     template< 
0034           typename Map
0035         , typename Key
0036         > 
0037     struct apply
0038         : eval_if< 
0039               has_key_impl<aux::map_tag>::apply<Map,Key>
0040             , eval_if< 
0041                   is_same< Key,typename Map::key_ > 
0042                 , base<Map>
0043                 , identity< m_mask<Key,Map> >
0044                 >
0045             , identity<Map>
0046             >
0047     {
0048     };
0049 };
0050 
0051 }}
0052 
0053 #endif // BOOST_MPL_MAP_AUX_ERASE_KEY_IMPL_HPP_INCLUDED