make_deque.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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_MAKE_DEQUE_01272013_1401)
  7. #define FUSION_MAKE_DEQUE_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_make_deque.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. namespace result_of
  20. {
  21. template <typename ...T>
  22. struct make_deque
  23. {
  24. typedef deque<typename detail::as_fusion_element<T>::type...> type;
  25. };
  26. }
  27. template <typename ...T>
  28. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  29. inline deque<typename detail::as_fusion_element<T>::type...>
  30. make_deque(T const&... arg)
  31. {
  32. return deque<typename detail::as_fusion_element<T>::type...>(arg...);
  33. }
  34. }}
  35. #endif
  36. #endif