next_impl.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*=============================================================================
  2. Copyright (c) 2009 Hartmut Kaiser
  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(BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM)
  7. #define BOOST_FUSION_NVIEW_NEXT_IMPL_SEP_24_2009_0116PM
  8. #include <boost/mpl/next.hpp>
  9. namespace boost { namespace fusion
  10. {
  11. struct nview_iterator_tag;
  12. template <typename Sequence, typename Pos>
  13. struct nview_iterator;
  14. namespace extension
  15. {
  16. template <typename Tag>
  17. struct next_impl;
  18. template <>
  19. struct next_impl<nview_iterator_tag>
  20. {
  21. template <typename Iterator>
  22. struct apply
  23. {
  24. typedef typename Iterator::first_type::iterator_type first_type;
  25. typedef typename Iterator::sequence_type sequence_type;
  26. typedef nview_iterator<sequence_type,
  27. typename mpl::next<first_type>::type> type;
  28. static type
  29. call(Iterator const& i)
  30. {
  31. return type(i.seq);
  32. }
  33. };
  34. };
  35. }
  36. }}
  37. #endif