end_impl.hpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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_07202005_0851)
  7. #define FUSION_END_IMPL_07202005_0851
  8. namespace boost { namespace fusion
  9. {
  10. struct reverse_view_tag;
  11. template <typename Iterator>
  12. struct reverse_view_iterator;
  13. namespace extension
  14. {
  15. template <typename Tag>
  16. struct end_impl;
  17. template <>
  18. struct end_impl<reverse_view_tag>
  19. {
  20. template <typename Sequence>
  21. struct apply
  22. {
  23. typedef reverse_view_iterator<typename Sequence::first_type> type;
  24. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  25. static type
  26. call(Sequence const& s)
  27. {
  28. return type(s.first());
  29. }
  30. };
  31. };
  32. }
  33. }}
  34. #endif