deref_data_impl.hpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*=============================================================================
  2. Copyright (c) 2009 Christopher Schmidt
  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. #ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
  7. #define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_DEREF_DATA_IMPL_HPP
  8. #include <boost/fusion/support/config.hpp>
  9. #include <boost/fusion/iterator/deref_data.hpp>
  10. namespace boost { namespace fusion { namespace extension
  11. {
  12. template <typename>
  13. struct deref_data_impl;
  14. template <>
  15. struct deref_data_impl<reverse_view_iterator_tag>
  16. {
  17. template <typename It>
  18. struct apply
  19. {
  20. typedef typename
  21. result_of::deref_data<typename It::first_type>::type
  22. type;
  23. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  24. static type
  25. call(It const& it)
  26. {
  27. return fusion::deref_data(it.first);
  28. }
  29. };
  30. };
  31. }}}
  32. #endif