1 /*============================================================================= 2 Copyright (c) 2010 Christopher Schmidt 3 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 8 #ifndef BOOST_FUSION_ADAPTED_ARRAY_DEREF_IMPL_HPP 9 #define BOOST_FUSION_ADAPTED_ARRAY_DEREF_IMPL_HPP 10 11 #include <boost/fusion/support/config.hpp> 12 #include <boost/type_traits/add_reference.hpp> 13 #include <boost/type_traits/remove_extent.hpp> 14 15 namespace boost { namespace fusion { namespace extension 16 { 17 template <typename> 18 struct deref_impl; 19 20 template <> 21 struct deref_impl<po_array_iterator_tag> 22 { 23 template <typename It> 24 struct apply 25 { 26 typedef typename 27 add_reference< 28 typename remove_extent<typename It::seq_type>::type 29 >::type 30 type; 31 32 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED 33 static type callboost::fusion::extension::deref_impl::apply34 call(It const& it) 35 { 36 return (*it.seq)[It::index::value]; 37 } 38 }; 39 }; 40 }}} 41 42 #endif 43