deref_impl.hpp 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*=============================================================================
  2. Copyright (c) 2009-2010 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_ADAPTED_STRUCT_DETAIL_DEREF_IMPL_HPP
  7. #define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_DEREF_IMPL_HPP
  8. namespace boost { namespace fusion { namespace extension
  9. {
  10. template <typename>
  11. struct deref_impl;
  12. template <>
  13. struct deref_impl<struct_iterator_tag>
  14. {
  15. template <typename It>
  16. struct apply
  17. {
  18. typedef typename
  19. access::struct_member<
  20. typename remove_const<typename It::seq_type>::type
  21. , It::index::value
  22. >::template apply<typename It::seq_type>
  23. impl;
  24. typedef typename impl::type type;
  25. BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
  26. static type
  27. call(It const& it)
  28. {
  29. return impl::call(*it.seq);
  30. }
  31. };
  32. };
  33. }}}
  34. #endif