begin_impl.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*=============================================================================
  2. Copyright (c) 2010 Christopher Schmidt
  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 BOOST_FUSION_ADAPTED_ARRAY_BEGIN_IMPL_HPP
  7. #define BOOST_FUSION_ADAPTED_ARRAY_BEGIN_IMPL_HPP
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/iterator/basic_iterator.hpp>
  10. namespace boost { namespace fusion { namespace extension
  11. {
  12. template<typename>
  13. struct begin_impl;
  14. template <>
  15. struct begin_impl<po_array_tag>
  16. {
  17. template <typename Seq>
  18. struct apply
  19. {
  20. typedef
  21. basic_iterator<
  22. po_array_iterator_tag
  23. , random_access_traversal_tag
  24. , Seq
  25. , 0
  26. >
  27. type;
  28. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  29. static type
  30. call(Seq& seq)
  31. {
  32. return type(seq,0);
  33. }
  34. };
  35. };
  36. }}}
  37. #endif