tuple_tie.hpp 2.6 KB

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