segmented_end.hpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*=============================================================================
  2. Copyright (c) 2011 Eric Niebler
  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_SEGMENTED_END_HPP_INCLUDED)
  7. #define BOOST_FUSION_SEGMENTED_END_HPP_INCLUDED
  8. #include <boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp>
  9. #include <boost/fusion/iterator/segmented_iterator.hpp>
  10. #include <boost/fusion/container/list/cons.hpp>
  11. namespace boost { namespace fusion { namespace detail
  12. {
  13. //auto segmented_end( seq )
  14. //{
  15. // return make_segmented_iterator( segmented_end_impl( seq ) );
  16. //}
  17. template <typename Sequence, typename Nil_ = fusion::nil_>
  18. struct segmented_end
  19. {
  20. typedef
  21. segmented_iterator<
  22. typename segmented_end_impl<Sequence, Nil_>::type
  23. >
  24. type;
  25. static type call(Sequence & seq)
  26. {
  27. return type(
  28. segmented_end_impl<Sequence, Nil_>::call(seq, Nil_()));
  29. }
  30. };
  31. }}}
  32. #endif