File indexing completed on 2025-01-18 09:33:20
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined(FUSION_NEXT_IMPL_07172005_0836)
0009 #define FUSION_NEXT_IMPL_07172005_0836
0010
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/iterator/next.hpp>
0013 #include <boost/fusion/iterator/equal_to.hpp>
0014 #include <boost/mpl/eval_if.hpp>
0015 #include <boost/mpl/identity.hpp>
0016 #include <boost/type_traits/is_const.hpp>
0017 #include <boost/type_traits/add_const.hpp>
0018
0019 namespace boost { namespace fusion
0020 {
0021 struct cons_iterator_tag;
0022
0023 template <typename Cons>
0024 struct cons_iterator;
0025
0026 namespace extension
0027 {
0028 template <typename Tag>
0029 struct next_impl;
0030
0031 template <>
0032 struct next_impl<cons_iterator_tag>
0033 {
0034 template <typename Iterator>
0035 struct apply
0036 {
0037 typedef typename Iterator::cons_type cons_type;
0038 typedef typename cons_type::cdr_type cdr_type;
0039
0040 typedef cons_iterator<
0041 typename mpl::eval_if<
0042 is_const<cons_type>
0043 , add_const<cdr_type>
0044 , mpl::identity<cdr_type>
0045 >::type>
0046 type;
0047
0048 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0049 static type
0050 call(Iterator const& i)
0051 {
0052 return type(i.cons.cdr);
0053 }
0054 };
0055 };
0056 }
0057 }}
0058
0059 #endif
0060
0061