vector_tie.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*=============================================================================
  2. Copyright (c) 2014 Kohei Takahashi
  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 FUSION_VECTOR_TIE_11112014_2302
  7. #define FUSION_VECTOR_TIE_11112014_2302
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/container/vector/detail/config.hpp>
  10. #if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
  11. # include <boost/fusion/container/generation/detail/pp_vector_tie.hpp>
  12. #else
  13. ///////////////////////////////////////////////////////////////////////////////
  14. // C++11 variadic interface
  15. ///////////////////////////////////////////////////////////////////////////////
  16. namespace boost { namespace fusion
  17. {
  18. namespace result_of
  19. {
  20. template <typename ...T>
  21. struct vector_tie
  22. {
  23. typedef vector<T&...> type;
  24. };
  25. }
  26. template <typename ...T>
  27. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  28. inline vector<T&...>
  29. vector_tie(T&... arg)
  30. {
  31. return vector<T&...>(arg...);
  32. }
  33. }}
  34. #endif
  35. #endif