pp_make_deque.hpp 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 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. #ifndef BOOST_PP_IS_ITERATING
  8. #if !defined(FUSION_PP_MAKE_DEQUE_07162005_0243)
  9. #define FUSION_MAKE_PP_DEQUE_07162005_0243
  10. #include <boost/preprocessor/iterate.hpp>
  11. #include <boost/preprocessor/repetition/enum_params.hpp>
  12. #include <boost/preprocessor/repetition/enum_binary_params.hpp>
  13. #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
  14. #include <boost/preprocessor/repetition/repeat_from_to.hpp>
  15. #include <boost/fusion/container/deque/deque.hpp>
  16. #include <boost/fusion/support/detail/as_fusion_element.hpp>
  17. #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
  18. #include <boost/fusion/container/generation/detail/preprocessed/make_deque.hpp>
  19. #else
  20. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  21. #pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_deque" FUSION_MAX_DEQUE_SIZE_STR ".hpp")
  22. #endif
  23. /*=============================================================================
  24. Copyright (c) 2001-2011 Joel de Guzman
  25. Distributed under the Boost Software License, Version 1.0. (See accompanying
  26. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  27. This is an auto-generated file. Do not edit!
  28. ==============================================================================*/
  29. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  30. #pragma wave option(preserve: 1)
  31. #endif
  32. namespace boost { namespace fusion
  33. {
  34. struct void_;
  35. namespace result_of
  36. {
  37. template <
  38. BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(
  39. FUSION_MAX_DEQUE_SIZE, typename T, void_)
  40. , typename Extra = void_
  41. >
  42. struct make_deque;
  43. template <>
  44. struct make_deque<>
  45. {
  46. typedef deque<> type;
  47. };
  48. }
  49. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  50. inline deque<>
  51. make_deque()
  52. {
  53. return deque<>();
  54. }
  55. #define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
  56. typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
  57. #define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_deque.hpp>
  58. #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
  59. #include BOOST_PP_ITERATE()
  60. #undef BOOST_FUSION_AS_FUSION_ELEMENT
  61. }}
  62. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  63. #pragma wave option(output: null)
  64. #endif
  65. #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
  66. #endif
  67. #else // defined(BOOST_PP_IS_ITERATING)
  68. ///////////////////////////////////////////////////////////////////////////////
  69. //
  70. // Preprocessor vertical repetition code
  71. //
  72. ///////////////////////////////////////////////////////////////////////////////
  73. #define N BOOST_PP_ITERATION()
  74. namespace result_of
  75. {
  76. template <BOOST_PP_ENUM_PARAMS(N, typename T)>
  77. #define TEXT(z, n, text) , text
  78. struct make_deque< BOOST_PP_ENUM_PARAMS(N, T) BOOST_PP_REPEAT_FROM_TO(BOOST_PP_DEC(N), FUSION_MAX_DEQUE_SIZE, TEXT, void_) >
  79. #undef TEXT
  80. {
  81. typedef deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)> type;
  82. };
  83. }
  84. template <BOOST_PP_ENUM_PARAMS(N, typename T)>
  85. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  86. inline deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
  87. make_deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg))
  88. {
  89. return deque<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
  90. BOOST_PP_ENUM_PARAMS(N, arg));
  91. }
  92. #undef N
  93. #endif // defined(BOOST_PP_IS_ITERATING)