Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:41:43

0001 
0002 #ifndef BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED
0003 #define BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED
0004 
0005 // Copyright Aleksey Gurtovoy 2003-2004
0006 // Copyright David Abrahams 2003-2004
0007 //
0008 // Distributed under the Boost Software License, Version 1.0. 
0009 // (See accompanying file LICENSE_1_0.txt or copy at 
0010 // http://www.boost.org/LICENSE_1_0.txt)
0011 //
0012 // See http://www.boost.org/libs/mpl for documentation.
0013 
0014 // $Id$
0015 // $Date$
0016 // $Revision$
0017 
0018 #include <boost/mpl/long.hpp>
0019 #include <boost/mpl/void.hpp>
0020 #include <boost/mpl/map/aux_/tag.hpp>
0021 #include <boost/mpl/aux_/na.hpp>
0022 #include <boost/mpl/aux_/yes_no.hpp>
0023 #include <boost/mpl/aux_/overload_names.hpp>
0024 #include <boost/mpl/aux_/config/operators.hpp>
0025 
0026 #include <boost/preprocessor/cat.hpp>
0027 
0028 namespace boost { namespace mpl {
0029 
0030 #if defined(BOOST_MPL_CFG_USE_OPERATORS_OVERLOADING)
0031 
0032 #   define BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T) \
0033     friend R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \
0034 /**/
0035 
0036 #   define BOOST_MPL_AUX_MAP_OVERLOAD(R, f, X, T) \
0037     BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T) \
0038 /**/
0039 
0040 #else
0041 
0042 #   define BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T) \
0043     static R BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f)(X const&, T) \
0044 /**/
0045 
0046 #   define BOOST_MPL_AUX_MAP_OVERLOAD(R, f, X, T) \
0047     BOOST_MPL_AUX_MAP0_OVERLOAD(R, f, X, T); \
0048     using Base::BOOST_PP_CAT(BOOST_MPL_AUX_OVERLOAD_,f) \
0049 /**/
0050 
0051 #endif
0052 
0053 
0054 template< typename Dummy = na > struct map0
0055 {
0056     typedef map0            type;
0057     typedef aux::map_tag    tag;
0058     typedef void_           key_;
0059     typedef long_<1>        order;
0060     typedef long_<0>        size;
0061 
0062 #if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES)
0063     BOOST_MPL_AUX_MAP0_OVERLOAD( aux::type_wrapper<void_>, VALUE_BY_KEY, map0<>, void const volatile* );
0064     BOOST_MPL_AUX_MAP0_OVERLOAD( aux::type_wrapper<void_>, ITEM_BY_ORDER, map0<>, long_<1>* );
0065     BOOST_MPL_AUX_MAP0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, map0<>, void const volatile* );
0066 #else
0067     BOOST_MPL_AUX_MAP0_OVERLOAD( aux::no_tag, ORDER_BY_KEY, map0<>, void const volatile* );
0068     BOOST_MPL_AUX_MAP0_OVERLOAD( aux::no_tag, IS_MASKED, map0<>, void const volatile* );
0069 #endif
0070 };
0071 
0072 }}
0073 
0074 #endif // BOOST_MPL_MAP_AUX_MAP0_HPP_INCLUDED