back.hpp 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. /*=============================================================================
  2. Copyright (c) 2001-2011 Joel de Guzman
  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(FUSION_BACK_10022005_1620)
  7. #define FUSION_BACK_10022005_1620
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/mpl/back.hpp>
  10. #include <boost/fusion/sequence/intrinsic/end.hpp>
  11. #include <boost/fusion/iterator/prior.hpp>
  12. #include <boost/fusion/iterator/value_of.hpp>
  13. namespace boost { namespace mpl
  14. {
  15. template <typename Tag>
  16. struct back_impl;
  17. template <>
  18. struct back_impl<fusion::fusion_sequence_tag>
  19. {
  20. template <typename Sequence>
  21. struct apply :
  22. fusion::result_of::value_of<
  23. typename fusion::result_of::prior<
  24. typename fusion::result_of::end<Sequence>::type
  25. >::type> {};
  26. };
  27. }}
  28. #endif