![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /usr/include/boost/fusion/adapted/mpl/ |
Upload File : |
/*============================================================================= Copyright (c) 2001-2011 Joel de Guzman Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(FUSION_MPL_ITERATOR_05052005_0731) #define FUSION_MPL_ITERATOR_05052005_0731 #include <boost/fusion/support/config.hpp> #include <boost/fusion/support/detail/mpl_iterator_category.hpp> #include <boost/fusion/iterator/iterator_facade.hpp> #include <boost/type_traits/remove_const.hpp> #include <boost/mpl/deref.hpp> #include <boost/mpl/next.hpp> #include <boost/mpl/prior.hpp> #include <boost/mpl/advance.hpp> #include <boost/mpl/distance.hpp> namespace boost { namespace fusion { template <typename Iterator_> struct mpl_iterator : iterator_facade< mpl_iterator<Iterator_> , typename detail::mpl_iterator_category<typename Iterator_::category>::type > { typedef typename remove_const<Iterator_>::type iterator_type; template <typename Iterator> struct value_of : mpl::deref<typename Iterator::iterator_type> {}; template <typename Iterator> struct deref { typedef typename mpl::deref< typename Iterator::iterator_type>::type type; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator) { return type(); } }; template <typename Iterator> struct next { typedef mpl_iterator< typename mpl::next<typename Iterator::iterator_type>::type> type; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator) { return type(); } }; template <typename Iterator> struct prior { typedef mpl_iterator< typename mpl::prior<typename Iterator::iterator_type>::type> type; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator) { return type(); } }; template <typename Iterator, typename N> struct advance { typedef mpl_iterator< typename mpl::advance<typename Iterator::iterator_type, N>::type> type; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(Iterator const& /*i*/) { return type(); } }; template <typename I1, typename I2> struct distance : mpl::distance< typename I1::iterator_type , typename I2::iterator_type> { typedef typename mpl::distance< typename I1::iterator_type , typename I2::iterator_type >::type type; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED static type call(I1 const&, I2 const&) { return type(); } }; }; }} #ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408 namespace std { template <typename Iterator> struct iterator_traits< ::boost::fusion::mpl_iterator<Iterator> > { }; } #endif #endif