list_tie.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*=============================================================================
  2. Copyright (c) 2015 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_LIST_TIE_06182015_0825
  7. #define FUSION_LIST_TIE_06182015_0825
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/container/list/list.hpp>
  10. #if !defined(BOOST_FUSION_HAS_VARIADIC_LIST)
  11. # include <boost/fusion/container/generation/detail/pp_list_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 list_tie
  22. {
  23. typedef list<T&...> type;
  24. };
  25. }
  26. template <typename ...T>
  27. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  28. inline list<T&...>
  29. list_tie(T&... arg)
  30. {
  31. return list<T&...>(arg...);
  32. }
  33. }}
  34. #endif
  35. #endif