1 /*=============================================================================
2 Copyright (c) 2009 Christopher Schmidt
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 #ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
9 #define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
11 #include <boost/fusion/support/config.hpp>
12 #include <boost/fusion/sequence/intrinsic/at.hpp>
13 #include <boost/mpl/minus.hpp>
14 #include <boost/mpl/int.hpp>
16 namespace boost { namespace fusion { namespace extension
22 struct at_impl<reverse_view_tag>
24 template <typename Seq, typename N>
27 typedef mpl::minus<typename Seq::size, mpl::int_<1>, N> real_n;
30 result_of::at<typename Seq::seq_type, real_n>::type
33 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
37 return fusion::at<real_n>(seq.seq);