deque_keyed_values.hpp 3.7 KB

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