File indexing completed on 2024-11-15 09:09:52
0001
0002
0003
0004
0005
0006
0007 #if !defined(FUSION_NEXT_05042005_1101)
0008 #define FUSION_NEXT_05042005_1101
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/support/tag_of.hpp>
0012
0013 namespace boost { namespace fusion
0014 {
0015
0016 struct iterator_facade_tag;
0017 struct boost_array_iterator_tag;
0018 struct mpl_iterator_tag;
0019 struct std_pair_iterator_tag;
0020
0021 namespace extension
0022 {
0023 template <typename Tag>
0024 struct next_impl
0025 {
0026 template <typename Iterator>
0027 struct apply {};
0028 };
0029
0030 template <>
0031 struct next_impl<iterator_facade_tag>
0032 {
0033 template <typename Iterator>
0034 struct apply : Iterator::template next<Iterator> {};
0035 };
0036
0037 template <>
0038 struct next_impl<boost_array_iterator_tag>;
0039
0040 template <>
0041 struct next_impl<mpl_iterator_tag>;
0042
0043 template <>
0044 struct next_impl<std_pair_iterator_tag>;
0045 }
0046
0047 namespace result_of
0048 {
0049 template <typename Iterator>
0050 struct next
0051 : extension::next_impl<typename detail::tag_of<Iterator>::type>::
0052 template apply<Iterator>
0053 {};
0054 }
0055
0056 template <typename Iterator>
0057 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0058 inline typename result_of::next<Iterator>::type const
0059 next(Iterator const& i)
0060 {
0061 return result_of::next<Iterator>::call(i);
0062 }
0063 }}
0064
0065 #endif