end_impl.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  3. Copyright (c) 2005-2006 Dan Marsden
  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_END_IMPL_31122005_1237)
  8. #define BOOST_FUSION_END_IMPL_31122005_1237
  9. #include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
  10. #include <boost/mpl/end.hpp>
  11. #include <boost/type_traits/add_const.hpp>
  12. namespace boost { namespace fusion
  13. {
  14. struct mpl_sequence_tag;
  15. namespace extension
  16. {
  17. template <typename Tag>
  18. struct end_impl;
  19. template <>
  20. struct end_impl<mpl_sequence_tag>
  21. {
  22. template <typename Sequence>
  23. struct apply
  24. {
  25. typedef typename mpl::end<
  26. typename remove_const<Sequence>::type
  27. >::type iterator;
  28. typedef mpl_iterator<iterator> type;
  29. static type
  30. call(Sequence)
  31. {
  32. return type();
  33. }
  34. };
  35. };
  36. }
  37. }}
  38. #endif