annotate DEPENDENCIES/generic/include/boost/mpl/map/aux_/insert_impl.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children c530137014c0
rev   line source
Chris@16 1
Chris@16 2 #ifndef BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED
Chris@16 3 #define BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED
Chris@16 4
Chris@16 5 // Copyright Aleksey Gurtovoy 2003-2004
Chris@16 6 // Copyright David Abrahams 2003-2004
Chris@16 7 //
Chris@16 8 // Distributed under the Boost Software License, Version 1.0.
Chris@16 9 // (See accompanying file LICENSE_1_0.txt or copy at
Chris@16 10 // http://www.boost.org/LICENSE_1_0.txt)
Chris@16 11 //
Chris@16 12 // See http://www.boost.org/libs/mpl for documentation.
Chris@16 13
Chris@16 14 // $Id: insert_impl.hpp 55751 2009-08-24 04:11:00Z agurtovoy $
Chris@16 15 // $Date: 2009-08-23 21:11:00 -0700 (Sun, 23 Aug 2009) $
Chris@16 16 // $Revision: 55751 $
Chris@16 17
Chris@16 18 #include <boost/mpl/insert_fwd.hpp>
Chris@16 19 #include <boost/mpl/next_prior.hpp>
Chris@16 20 #include <boost/mpl/map/aux_/contains_impl.hpp>
Chris@16 21 #include <boost/mpl/map/aux_/item.hpp>
Chris@16 22 #include <boost/mpl/map/aux_/tag.hpp>
Chris@16 23 #include <boost/mpl/aux_/na.hpp>
Chris@16 24 #include <boost/mpl/aux_/config/typeof.hpp>
Chris@16 25
Chris@16 26 namespace boost { namespace mpl {
Chris@16 27
Chris@16 28 namespace aux {
Chris@16 29 template< typename Map, typename Pair >
Chris@16 30 struct map_insert_impl
Chris@16 31 : if_<
Chris@16 32 contains_impl<aux::map_tag>::apply<Map,Pair>
Chris@16 33 , Map
Chris@16 34 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
Chris@16 35 , m_item<
Chris@16 36 typename Pair::first
Chris@16 37 , typename Pair::second
Chris@16 38 , Map
Chris@16 39 >
Chris@16 40 #else
Chris@16 41 , m_item<
Chris@16 42 Map::order::value
Chris@16 43 , typename Pair::first
Chris@16 44 , typename Pair::second
Chris@16 45 , Map
Chris@16 46 >
Chris@16 47 #endif
Chris@16 48 >
Chris@16 49 {
Chris@16 50 };
Chris@16 51 }
Chris@16 52
Chris@16 53 template<>
Chris@16 54 struct insert_impl< aux::map_tag >
Chris@16 55 {
Chris@16 56 template<
Chris@16 57 typename Map
Chris@16 58 , typename PosOrKey
Chris@16 59 , typename KeyOrNA
Chris@16 60 >
Chris@16 61 struct apply
Chris@16 62 : aux::map_insert_impl<
Chris@16 63 Map
Chris@16 64 , typename if_na<KeyOrNA,PosOrKey>::type
Chris@16 65 >
Chris@16 66 {
Chris@16 67 };
Chris@16 68 };
Chris@16 69
Chris@16 70 }}
Chris@16 71
Chris@16 72 #endif // BOOST_MPL_MAP_AUX_INSERT_IMPL_HPP_INCLUDED