File indexing completed on 2025-01-18 09:34:59
0001
0002
0003
0004
0005
0006
0007 #if !defined(FUSION_REVERSE_VIEW_ITERATOR_07202005_0835)
0008 #define FUSION_REVERSE_VIEW_ITERATOR_07202005_0835
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/iterator_base.hpp>
0012 #include <boost/fusion/support/category_of.hpp>
0013 #include <boost/fusion/iterator/mpl/convert_iterator.hpp>
0014 #include <boost/fusion/adapted/mpl/mpl_iterator.hpp>
0015 #include <boost/fusion/view/reverse_view/detail/deref_impl.hpp>
0016 #include <boost/fusion/view/reverse_view/detail/next_impl.hpp>
0017 #include <boost/fusion/view/reverse_view/detail/prior_impl.hpp>
0018 #include <boost/fusion/view/reverse_view/detail/advance_impl.hpp>
0019 #include <boost/fusion/view/reverse_view/detail/distance_impl.hpp>
0020 #include <boost/fusion/view/reverse_view/detail/value_of_impl.hpp>
0021 #include <boost/fusion/view/reverse_view/detail/deref_data_impl.hpp>
0022 #include <boost/fusion/view/reverse_view/detail/value_of_data_impl.hpp>
0023 #include <boost/fusion/view/reverse_view/detail/key_of_impl.hpp>
0024 #include <boost/type_traits/is_base_of.hpp>
0025 #include <boost/static_assert.hpp>
0026
0027 #ifdef _MSC_VER
0028 # pragma warning(push)
0029 # pragma warning(disable: 4512)
0030 #endif
0031
0032 namespace boost { namespace fusion
0033 {
0034 struct reverse_view_iterator_tag;
0035
0036 template <typename First>
0037 struct reverse_view_iterator
0038 : iterator_base<reverse_view_iterator<First> >
0039 {
0040 typedef convert_iterator<First> converter;
0041 typedef typename converter::type first_type;
0042 typedef reverse_view_iterator_tag fusion_tag;
0043 typedef typename traits::category_of<first_type>::type category;
0044
0045 BOOST_STATIC_ASSERT((
0046 is_base_of<
0047 bidirectional_traversal_tag
0048 , category>::value));
0049
0050 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0051 reverse_view_iterator(First const& in_first)
0052 : first(converter::call(in_first)) {}
0053
0054 first_type first;
0055 };
0056 }}
0057
0058 #ifdef _MSC_VER
0059 # pragma warning(pop)
0060 #endif
0061
0062 #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
0063 namespace std
0064 {
0065 template <typename First>
0066 struct iterator_traits< ::boost::fusion::reverse_view_iterator<First> >
0067 { };
0068 }
0069 #endif
0070
0071 #endif
0072