begin_impl.hpp 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*=============================================================================
  2. Copyright (c) 2005-2012 Joel de Guzman
  3. Copyright (c) 2005-2006 Dan Marsden
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #if !defined(BOOST_FUSION_DEQUE_BEGIN_IMPL_09122006_2034)
  8. #define BOOST_FUSION_DEQUE_BEGIN_IMPL_09122006_2034
  9. #include <boost/fusion/support/config.hpp>
  10. #include <boost/fusion/container/deque/deque_iterator.hpp>
  11. namespace boost { namespace fusion
  12. {
  13. struct deque_tag;
  14. namespace extension
  15. {
  16. template<typename T>
  17. struct begin_impl;
  18. template<>
  19. struct begin_impl<deque_tag>
  20. {
  21. template<typename Sequence>
  22. struct apply
  23. {
  24. typedef
  25. deque_iterator<Sequence, (Sequence::next_down::value + 1)>
  26. type;
  27. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  28. static type call(Sequence& seq)
  29. {
  30. return type(seq);
  31. }
  32. };
  33. };
  34. }
  35. }}
  36. #endif