end_impl.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 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_END_IMPL_27122005_1120)
  8. #define BOOST_FUSION_END_IMPL_27122005_1120
  9. #include <boost/fusion/support/config.hpp>
  10. #include <boost/fusion/adapted/boost_array/array_iterator.hpp>
  11. namespace boost { namespace fusion {
  12. struct boost_array_tag;
  13. namespace extension
  14. {
  15. template <typename Tag>
  16. struct end_impl;
  17. template <>
  18. struct end_impl<boost_array_tag>
  19. {
  20. template <typename Sequence>
  21. struct apply
  22. {
  23. typedef array_iterator<Sequence, Sequence::static_size> 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