1 /*=============================================================================
2 Copyright (c) 2007 Tobias Schwinger
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_ITERATOR_RANGE_AT_IMPL_HPP_INCLUDED)
9 #define BOOST_FUSION_ITERATOR_RANGE_AT_IMPL_HPP_INCLUDED
11 #include <boost/fusion/iterator/advance.hpp>
12 #include <boost/fusion/iterator/deref.hpp>
14 namespace boost { namespace fusion
16 struct iterator_range_tag;
20 template <typename Tag>
24 struct at_impl<iterator_range_tag>
26 template <typename Seq, typename N>
29 typedef typename Seq::begin_type begin_type;
30 typedef typename result_of::advance<begin_type,N>::type pos;
31 typedef typename result_of::deref<pos>::type type;
36 return * fusion::advance<N>(s.first);