File indexing completed on 2025-01-18 09:34:59
0001
0002
0003
0004
0005
0006
0007
0008 #ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
0009 #define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_AT_IMPL_HPP
0010
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/sequence/intrinsic/at.hpp>
0013 #include <boost/mpl/minus.hpp>
0014 #include <boost/mpl/int.hpp>
0015
0016 namespace boost { namespace fusion { namespace extension
0017 {
0018 template <typename>
0019 struct at_impl;
0020
0021 template <>
0022 struct at_impl<reverse_view_tag>
0023 {
0024 template <typename Seq, typename N>
0025 struct apply
0026 {
0027 typedef mpl::minus<typename Seq::size, mpl::int_<1>, N> real_n;
0028
0029 typedef typename
0030 result_of::at<typename Seq::seq_type, real_n>::type
0031 type;
0032
0033 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0034 static type
0035 call(Seq& seq)
0036 {
0037 return fusion::at<real_n>(seq.seq);
0038 }
0039 };
0040 };
0041 }}}
0042
0043 #endif