back.hpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  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/mpl/back.hpp>
  9. #include <boost/fusion/sequence/intrinsic/end.hpp>
  10. #include <boost/fusion/iterator/prior.hpp>
  11. #include <boost/fusion/iterator/value_of.hpp>
  12. namespace boost { namespace mpl
  13. {
  14. template <typename Tag>
  15. struct back_impl;
  16. template <>
  17. struct back_impl<fusion::fusion_sequence_tag>
  18. {
  19. template <typename Sequence>
  20. struct apply :
  21. fusion::result_of::value_of<
  22. typename fusion::result_of::prior<
  23. typename fusion::result_of::end<Sequence>::type
  24. >::type> {};
  25. };
  26. }}
  27. #endif