1 /*=============================================================================
2 Copyright (c) 2001-2006 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>
14 namespace boost { namespace fusion
16 struct vector_iterator_tag;
20 template <typename Tag>
24 struct deref_impl<vector_iterator_tag>
26 template <typename Iterator>
29 typedef typename Iterator::vector vector;
30 typedef typename Iterator::index index;
31 typedef typename mpl::at<
32 typename vector::types, index>
38 , fusion::detail::cref_result<element>
39 , fusion::detail::ref_result<element>
44 call(Iterator const& i)
46 return i.vec.at_impl(index());