make_tuple.hpp 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Distributed under the Boost Software License, Version 1.0. (See accompanying
  4. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  5. ==============================================================================*/
  6. #ifndef BOOST_PP_IS_ITERATING
  7. #if !defined(FUSION_MAKE_TUPLE_10032005_0843)
  8. #define FUSION_MAKE_TUPLE_10032005_0843
  9. #include <boost/preprocessor/iterate.hpp>
  10. #include <boost/preprocessor/repetition/enum_params.hpp>
  11. #include <boost/preprocessor/repetition/enum_binary_params.hpp>
  12. #include <boost/fusion/tuple/detail/tuple.hpp>
  13. #include <boost/fusion/support/detail/as_fusion_element.hpp>
  14. namespace boost { namespace fusion
  15. {
  16. BOOST_FUSION_GPU_ENABLED inline tuple<>
  17. make_tuple()
  18. {
  19. return tuple<>();
  20. }
  21. }}
  22. #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
  23. #include <boost/fusion/tuple/detail/preprocessed/make_tuple.hpp>
  24. #else
  25. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  26. #pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_tuple" FUSION_MAX_VECTOR_SIZE_STR ".hpp")
  27. #endif
  28. /*=============================================================================
  29. Copyright (c) 2001-2011 Joel de Guzman
  30. Distributed under the Boost Software License, Version 1.0. (See accompanying
  31. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  32. This is an auto-generated file. Do not edit!
  33. ==============================================================================*/
  34. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  35. #pragma wave option(preserve: 1)
  36. #endif
  37. namespace boost { namespace fusion
  38. {
  39. #define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
  40. typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
  41. #define BOOST_PP_FILENAME_1 <boost/fusion/tuple/detail/make_tuple.hpp>
  42. #define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
  43. #include BOOST_PP_ITERATE()
  44. #undef BOOST_FUSION_AS_FUSION_ELEMENT
  45. }}
  46. #if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
  47. #pragma wave option(output: null)
  48. #endif
  49. #endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
  50. #endif
  51. #else // defined(BOOST_PP_IS_ITERATING)
  52. ///////////////////////////////////////////////////////////////////////////////
  53. //
  54. // Preprocessor vertical repetition code
  55. //
  56. ///////////////////////////////////////////////////////////////////////////////
  57. #define N BOOST_PP_ITERATION()
  58. template <BOOST_PP_ENUM_PARAMS(N, typename T)>
  59. BOOST_FUSION_GPU_ENABLED
  60. inline tuple<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>
  61. make_tuple(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg))
  62. {
  63. return tuple<BOOST_PP_ENUM(N, BOOST_FUSION_AS_FUSION_ELEMENT, _)>(
  64. BOOST_PP_ENUM_PARAMS(N, arg));
  65. }
  66. #undef N
  67. #endif // defined(BOOST_PP_IS_ITERATING)