1 /*=============================================================================
2 Copyright (c) 2009 Hartmut Kaiser
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 ==============================================================================*/
8 #if !defined(BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM)
9 #define BOOST_FUSION_NVIEW_DEREF_IMPL_SEP_24_2009_0818AM
11 #include <boost/fusion/iterator/deref.hpp>
12 #include <boost/fusion/container/vector.hpp>
14 namespace boost { namespace fusion
16 struct nview_iterator_tag;
20 template<typename Tag>
24 struct deref_impl<nview_iterator_tag>
26 template<typename Iterator>
29 typedef typename Iterator::first_type first_type;
30 typedef typename Iterator::sequence_type sequence_type;
32 typedef typename result_of::deref<first_type>::type index;
33 typedef typename result_of::at<
34 typename sequence_type::sequence_type, index>::type type;
36 static type call(Iterator const& i)
38 return at<index>(i.seq.seq);