2 #ifndef BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED
3 #define BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED
5 // Copyright Aleksey Gurtovoy 2003-2004
6 // Copyright David Abrahams 2003-2004
8 // Distributed under the Boost Software License, Version 1.0.
9 // (See accompanying file LICENSE_1_0.txt or copy at
10 // http://www.boost.org/LICENSE_1_0.txt)
12 // See http://www.boost.org/libs/mpl for documentation.
18 #include <boost/mpl/insert_fwd.hpp>
19 #include <boost/mpl/next_prior.hpp>
20 #include <boost/mpl/map/aux_/contains_impl.hpp>
21 #include <boost/mpl/map/aux_/item.hpp>
22 #include <boost/mpl/map/aux_/tag.hpp>
23 #include <boost/mpl/aux_/na.hpp>
24 #include <boost/mpl/aux_/config/typeof.hpp>
26 namespace boost { namespace mpl {
29 template< typename Map, typename Pair >
30 struct map_insert_impl
32 contains_impl<aux::map_tag>::apply<Map,Pair>
34 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
37 , typename Pair::second
43 , typename Pair::first
44 , typename Pair::second
54 struct insert_impl< aux::map_tag >
62 : aux::map_insert_impl<
64 , typename if_na<KeyOrNA,PosOrKey>::type
72 #endif // BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED