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