![]() 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 : /proc/self/root/usr/include/boost/fusion/view/nview/detail/cpp03/ |
Upload File : |
/*============================================================================= Copyright (c) 2009 Hartmut Kaiser 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) ==============================================================================*/ #ifndef BOOST_PP_IS_ITERATING #if !defined(BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM) #define BOOST_FUSION_NVIEW_IMPL_SEP_23_2009_1017PM #include <climits> #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/repeat.hpp> #include <boost/preprocessor/iterate.hpp> #include <boost/preprocessor/repetition/enum_params.hpp> #include <boost/preprocessor/repetition/enum_binary_params.hpp> #include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> #include <boost/mpl/vector_c.hpp> #include <boost/fusion/adapted/mpl.hpp> #include <boost/fusion/adapted/mpl/mpl_iterator.hpp> #define BOOST_PP_ITERATION_PARAMS_1 \ (3, (1, FUSION_MAX_VECTOR_SIZE, \ "boost/fusion/view/nview/detail/cpp03/nview_impl.hpp")) \ /**/ /////////////////////////////////////////////////////////////////////////////// namespace boost { namespace fusion { namespace result_of { template <typename Sequence , BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT(FUSION_MAX_VECTOR_SIZE, int I, INT_MAX)> struct as_nview { typedef mpl::vector_c< int, BOOST_PP_ENUM_PARAMS(FUSION_MAX_VECTOR_SIZE, I) > index_type; typedef nview<Sequence, index_type> type; }; }}} #include BOOST_PP_ITERATE() #endif /////////////////////////////////////////////////////////////////////////////// // Preprocessor vertical repetition code /////////////////////////////////////////////////////////////////////////////// #else // defined(BOOST_PP_IS_ITERATING) #define N BOOST_PP_ITERATION() #if N < FUSION_MAX_VECTOR_SIZE namespace boost { namespace fusion { namespace result_of { template <typename Sequence, BOOST_PP_ENUM_PARAMS(N, int I)> struct as_nview<Sequence, BOOST_PP_ENUM_PARAMS(N, I)> { typedef mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> index_type; typedef nview<Sequence, index_type> type; }; }}} #endif namespace boost { namespace fusion { template<BOOST_PP_ENUM_PARAMS(N, int I), typename Sequence> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED inline nview<Sequence, mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> > as_nview(Sequence& s) { typedef mpl::vector_c<int, BOOST_PP_ENUM_PARAMS(N, I)> index_type; return nview<Sequence, index_type>(s); } }} #undef N #endif