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/mpl/at.hpp>
11 #include <boost/fusion/support/detail/access.hpp>
12 #include <boost/type_traits/is_const.hpp>
13 #include <boost/mpl/if.hpp>
15 namespace boost { namespace fusion
17 struct vector_iterator_tag;
21 template <typename Tag>
25 struct deref_impl<vector_iterator_tag>
27 template <typename Iterator>
30 typedef typename Iterator::vector vector;
31 typedef typename Iterator::index index;
32 typedef typename mpl::at<
33 typename vector::types, index>::type
39 , typename fusion::detail::cref_result<element>::type
40 , typename fusion::detail::ref_result<element>::type
45 call(Iterator const& i)
47 return i.vec.at_impl(index());