1 /*=============================================================================
2 Copyright (c) 2001-2011 Joel de Guzman
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 #if !defined(FUSION_DEREF_IMPL_05042005_1037)
8 #define FUSION_DEREF_IMPL_05042005_1037
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/support/detail/access.hpp>
12 #include <boost/fusion/container/vector/detail/value_at_impl.hpp>
13 #include <boost/type_traits/is_const.hpp>
14 #include <boost/mpl/if.hpp>
16 namespace boost { namespace fusion
18 struct vector_iterator_tag;
22 template <typename Tag>
26 struct deref_impl<vector_iterator_tag>
28 template <typename Iterator>
31 typedef typename Iterator::vector vector;
32 typedef typename Iterator::index index;
33 typedef typename value_at_impl<vector_tag>::template apply<vector, index>::type element;
38 , typename fusion::detail::cref_result<element>::type
39 , typename fusion::detail::ref_result<element>::type
43 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
45 call(Iterator const& i)
47 return i.vec.at_impl(index());