begin_impl.hpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 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_BEGIN_IMPL_05042005_1136)
  7. #define FUSION_BEGIN_IMPL_05042005_1136
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/container/vector/vector_iterator.hpp>
  10. namespace boost { namespace fusion
  11. {
  12. struct vector_tag;
  13. namespace extension
  14. {
  15. template <typename Tag>
  16. struct begin_impl;
  17. template <>
  18. struct begin_impl<vector_tag>
  19. {
  20. template <typename Sequence>
  21. struct apply
  22. {
  23. typedef vector_iterator<Sequence, 0> type;
  24. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  25. static type
  26. call(Sequence& v)
  27. {
  28. return type(v);
  29. }
  30. };
  31. };
  32. }
  33. }}
  34. #endif