segmented_begin.hpp 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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_BEGIN_HPP_INCLUDED)
  7. #define BOOST_FUSION_SEGMENTED_BEGIN_HPP_INCLUDED
  8. #include <boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp>
  9. #include <boost/fusion/iterator/segmented_iterator.hpp>
  10. #include <boost/fusion/view/iterator_range.hpp>
  11. #include <boost/fusion/sequence/intrinsic/begin.hpp>
  12. #include <boost/fusion/sequence/intrinsic/end.hpp>
  13. #include <boost/fusion/sequence/intrinsic/empty.hpp>
  14. #include <boost/fusion/container/list/cons.hpp>
  15. namespace boost { namespace fusion { namespace detail
  16. {
  17. //auto segmented_begin( seq )
  18. //{
  19. // return make_segmented_iterator( segmented_begin_impl( seq, nil_ ) );
  20. //}
  21. template <typename Sequence, typename Nil_ = fusion::nil_>
  22. struct segmented_begin
  23. {
  24. typedef
  25. segmented_iterator<
  26. typename segmented_begin_impl<Sequence, Nil_>::type
  27. >
  28. type;
  29. static type call(Sequence& seq)
  30. {
  31. return type(
  32. segmented_begin_impl<Sequence, Nil_>::call(seq, Nil_()));
  33. }
  34. };
  35. }}}
  36. #endif