1 /*============================================================================= 2 Copyright (c) 2005-2012 Joel de Guzman 3 Copyright (c) 2005-2006 Dan Marsden 4 5 Distributed under the Boost Software License, Version 1.0. (See accompanying 6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 ==============================================================================*/ 8 #if !defined(BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330) 9 #define BOOST_FUSION_DEQUE_DETAIL_DEQUE_KEYED_VALUES_26112006_1330 10 11 #if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE) 12 #error "C++03 only! This file should not have been included" 13 #endif 14 15 #include <boost/fusion/container/deque/detail/cpp03/limits.hpp> 16 #include <boost/fusion/container/deque/detail/keyed_element.hpp> 17 18 #include <boost/preprocessor/iterate.hpp> 19 #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> 20 #include <boost/preprocessor/repetition/enum_shifted_params.hpp> 21 #include <boost/preprocessor/repetition/enum.hpp> 22 #include <boost/preprocessor/repetition/enum_params.hpp> 23 #include <boost/type_traits/add_reference.hpp> 24 25 #include <boost/mpl/plus.hpp> 26 #include <boost/mpl/int.hpp> 27 28 #define FUSION_VOID(z, n, _) void_ 29 30 namespace boost { namespace fusion 31 { 32 struct void_; 33 }} 34 35 #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) 36 #include <boost/fusion/container/deque/detail/cpp03/preprocessed/deque_keyed_values.hpp> 37 #else 38 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) 39 #pragma wave option(preserve: 2, line: 0, output: "preprocessed/deque_keyed_values" FUSION_MAX_DEQUE_SIZE_STR ".hpp") 40 #endif 41 42 /*============================================================================= 43 Copyright (c) 2001-2011 Joel de Guzman 44 45 Distributed under the Boost Software License, Version 1.0. (See accompanying 46 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 47 48 This is an auto-generated file. Do not edit! 49 ==============================================================================*/ 50 51 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) 52 #pragma wave option(preserve: 1) 53 #endif 54 55 namespace boost { namespace fusion { namespace detail 56 { 57 template<typename Key, typename Value, typename Rest> 58 struct keyed_element; 59 60 struct nil_keyed_element; 61 62 template<typename N, BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_DEQUE_SIZE, typename T, void_)> 63 struct deque_keyed_values_impl; 64 65 template<typename N> 66 struct deque_keyed_values_impl<N, BOOST_PP_ENUM(FUSION_MAX_DEQUE_SIZE, FUSION_VOID, _)> 67 { 68 typedef nil_keyed_element type; 69 70 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED constructboost::fusion::detail::deque_keyed_values_impl71 static type construct() 72 { 73 return type(); 74 } 75 76 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED forward_boost::fusion::detail::deque_keyed_values_impl77 static type forward_() 78 { 79 return type(); 80 } 81 }; 82 83 template<typename N, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, typename T)> 84 struct deque_keyed_values_impl 85 { 86 typedef mpl::int_<mpl::plus<N, mpl::int_<1> >::value> next_index; 87 88 typedef typename deque_keyed_values_impl< 89 next_index, 90 BOOST_PP_ENUM_SHIFTED_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type tail; 91 typedef keyed_element<N, T0, tail> type; 92 93 #include <boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp> 94 95 }; 96 97 template<BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_DEQUE_SIZE, typename T, void_)> 98 struct deque_keyed_values 99 : deque_keyed_values_impl<mpl::int_<0>, BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)> 100 {}; 101 102 }}} 103 104 #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES) 105 #pragma wave option(output: null) 106 #endif 107 108 #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES 109 110 #undef FUSION_VOID 111 112 #endif 113