deque_tie.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*=============================================================================
  2. Copyright (c) 2001-2013 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. #if !defined(FUSION_DEQUE_TIE_01272013_1401)
  7. #define FUSION_DEQUE_TIE_01272013_1401
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/container/deque/deque.hpp>
  10. #if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
  11. # include <boost/fusion/container/generation/detail/pp_deque_tie.hpp>
  12. #else
  13. ///////////////////////////////////////////////////////////////////////////////
  14. // C++11 variadic interface
  15. ///////////////////////////////////////////////////////////////////////////////
  16. #include <boost/fusion/support/detail/as_fusion_element.hpp>
  17. namespace boost { namespace fusion
  18. {
  19. struct void_;
  20. namespace result_of
  21. {
  22. template <typename ...T>
  23. struct deque_tie
  24. {
  25. typedef deque<T&...> type;
  26. };
  27. }
  28. template <typename ...T>
  29. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  30. inline deque<T&...>
  31. deque_tie(T&... arg)
  32. {
  33. return deque<T&...>(arg...);
  34. }
  35. }}
  36. #endif
  37. #endif