end_impl.hpp 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 2011 Eric Niebler
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ==============================================================================*/
  7. #if !defined(BOOST_FUSION_SINGLE_VIEW_END_IMPL_05052005_0332)
  8. #define BOOST_FUSION_SINGLE_VIEW_END_IMPL_05052005_0332
  9. #include <boost/fusion/support/config.hpp>
  10. #include <boost/mpl/int.hpp>
  11. namespace boost { namespace fusion
  12. {
  13. struct single_view_tag;
  14. template <typename SingleView, typename Pos>
  15. struct single_view_iterator;
  16. namespace extension
  17. {
  18. template <typename Tag>
  19. struct end_impl;
  20. template <>
  21. struct end_impl<single_view_tag>
  22. {
  23. template <typename Sequence>
  24. struct apply
  25. {
  26. typedef single_view_iterator<Sequence, mpl::int_<1> > type;
  27. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  28. static type
  29. call(Sequence& seq)
  30. {
  31. return type(seq);
  32. }
  33. };
  34. };
  35. }
  36. }}
  37. #endif