end_impl.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_END_IMPL_05042005_1142)
  7. #define FUSION_END_IMPL_05042005_1142
  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 end_impl;
  17. template <>
  18. struct end_impl<vector_tag>
  19. {
  20. template <typename Sequence>
  21. struct apply
  22. {
  23. typedef typename Sequence::size size;
  24. typedef vector_iterator<Sequence, size::value> type;
  25. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  26. static type
  27. call(Sequence& v)
  28. {
  29. return type(v);
  30. }
  31. };
  32. };
  33. }
  34. }}
  35. #endif