]> AND Private Git Repository - canny.git/blob - stc/exp/ml_stc_linux_make_v1.0/include/boost/mpl/map/aux_/insert_impl.hpp
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
1f60df57839580e1867ffd9a4f1eeb83496023ad
[canny.git] / stc / exp / ml_stc_linux_make_v1.0 / include / boost / mpl / map / aux_ / insert_impl.hpp
1 \r
2 #ifndef BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED\r
3 #define BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED\r
4 \r
5 // Copyright Aleksey Gurtovoy 2003-2004\r
6 // Copyright David Abrahams 2003-2004\r
7 //\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
11 //\r
12 // See http://www.boost.org/libs/mpl for documentation.\r
13 \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
17 \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
25 \r
26 namespace boost { namespace mpl {\r
27 \r
28 namespace aux {\r
29 template< typename Map, typename Pair > \r
30 struct map_insert_impl\r
31     : if_< \r
32           contains_impl<aux::map_tag>::apply<Map,Pair>\r
33         , Map\r
34 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)\r
35         , m_item<\r
36               typename Pair::first\r
37             , typename Pair::second\r
38             , Map\r
39             >\r
40 #else\r
41         , m_item<\r
42               Map::order::value\r
43             , typename Pair::first\r
44             , typename Pair::second\r
45             , Map\r
46             >\r
47 #endif\r
48         >\r
49 {\r
50 };\r
51 }\r
52 \r
53 template<>\r
54 struct insert_impl< aux::map_tag >\r
55 {\r
56     template< \r
57           typename Map\r
58         , typename PosOrKey\r
59         , typename KeyOrNA\r
60         > \r
61     struct apply\r
62         : aux::map_insert_impl<\r
63               Map\r
64             , typename if_na<KeyOrNA,PosOrKey>::type\r
65             >\r
66     {\r
67     };\r
68 };\r
69 \r
70 }}\r
71 \r
72 #endif // BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED\r