]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | /*============================================================================= |
2 | Copyright (c) 2009 Christopher Schmidt | |
3 | ||
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 | ||
8 | #ifndef BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP | |
9 | #define BOOST_FUSION_VIEW_REVERSE_VIEW_DETAIL_VALUE_AT_IMPL_HPP | |
10 | ||
11 | #include <boost/fusion/support/config.hpp> | |
12 | #include <boost/fusion/sequence/intrinsic/value_at.hpp> | |
13 | #include <boost/mpl/minus.hpp> | |
14 | #include <boost/mpl/int.hpp> | |
15 | ||
16 | namespace boost { namespace fusion { namespace extension | |
17 | { | |
18 | template <typename> | |
19 | struct value_at_impl; | |
20 | ||
21 | template <> | |
22 | struct value_at_impl<reverse_view_tag> | |
23 | { | |
24 | template <typename Seq, typename N> | |
25 | struct apply | |
26 | : result_of::value_at< | |
27 | typename Seq::seq_type | |
28 | , mpl::minus<typename Seq::size, mpl::int_<1>, N> | |
29 | > | |
30 | {}; | |
31 | }; | |
32 | }}} | |
33 | ||
34 | #endif |