2 #ifndef BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
\r
3 #define BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
\r
5 // Copyright Aleksey Gurtovoy 2003-2007
\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 49267 2008-10-11 06:19:02Z agurtovoy $
\r
15 // $Date: 2008-10-11 02:19:02 -0400 (Sat, 11 Oct 2008) $
\r
16 // $Revision: 49267 $
\r
18 #include <boost/mpl/insert_fwd.hpp>
\r
19 #include <boost/mpl/set/aux_/has_key_impl.hpp>
\r
20 #include <boost/mpl/set/aux_/item.hpp>
\r
21 #include <boost/mpl/set/aux_/tag.hpp>
\r
22 #include <boost/mpl/identity.hpp>
\r
23 #include <boost/mpl/base.hpp>
\r
24 #include <boost/mpl/eval_if.hpp>
\r
25 #include <boost/mpl/aux_/na.hpp>
\r
27 #include <boost/type_traits/is_same.hpp>
\r
29 namespace boost { namespace mpl {
\r
32 template< typename Set, typename T > struct set_insert_impl
\r
34 has_key_impl<aux::set_tag>::apply<Set,T>
\r
37 is_same< T,typename Set::last_masked_ >
\r
39 , identity< s_item<T,typename Set::item_> >
\r
47 struct insert_impl< aux::set_tag >
\r
55 : aux::set_insert_impl<
\r
57 , typename if_na<KeyOrNA,PosOrKey>::type
\r
65 #endif // BOOST_MPL_SET_AUX_INSERT_IMPL_HPP_INCLUDED
\r