segmented_end.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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/support/config.hpp>
  9. #include <boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp>
  10. #include <boost/fusion/iterator/segmented_iterator.hpp>
  11. #include <boost/fusion/container/list/cons.hpp>
  12. namespace boost { namespace fusion { namespace detail
  13. {
  14. //auto segmented_end( seq )
  15. //{
  16. // return make_segmented_iterator( segmented_end_impl( seq ) );
  17. //}
  18. template <typename Sequence, typename Nil_ = fusion::nil_>
  19. struct segmented_end
  20. {
  21. typedef
  22. segmented_iterator<
  23. typename segmented_end_impl<Sequence, Nil_>::type
  24. >
  25. type;
  26. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  27. static type call(Sequence & seq)
  28. {
  29. return type(
  30. segmented_end_impl<Sequence, Nil_>::call(seq, Nil_()));
  31. }
  32. };
  33. }}}
  34. #endif