Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-31 09:41:55

0001 /*=============================================================================
0002     Copyright (c) 2014 Kohei Takahashi
0003 
0004     Distributed under the Boost Software License, Version 1.0. (See accompanying
0005     file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
0006 ==============================================================================*/
0007 #ifndef BOOST_FUSION_NVIEW_IMPL_17122014_1948
0008 #define BOOST_FUSION_NVIEW_IMPL_17122014_1948
0009 
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/container/vector/detail/config.hpp>
0012 
0013 ///////////////////////////////////////////////////////////////////////////////
0014 // Without variadics, we will use the PP version
0015 ///////////////////////////////////////////////////////////////////////////////
0016 #if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
0017 # include <boost/fusion/view/nview/detail/cpp03/nview_impl.hpp>
0018 #else
0019 
0020 ///////////////////////////////////////////////////////////////////////////////
0021 // C++11 interface
0022 ///////////////////////////////////////////////////////////////////////////////
0023 #include <boost/fusion/container/vector.hpp>
0024 #include <boost/mpl/int.hpp>
0025 
0026 namespace boost { namespace fusion
0027 {
0028     namespace result_of
0029     {
0030         template <typename Sequence, int ...I>
0031         struct as_nview
0032         {
0033             typedef vector<mpl::int_<I>...> index_type;
0034             typedef nview<Sequence, index_type> type;
0035         };
0036     }
0037 
0038     template <int ...I, typename Sequence>
0039     BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0040     inline nview<Sequence, vector<mpl::int_<I>...> >
0041     as_nview(Sequence& s)
0042     {
0043         typedef vector<mpl::int_<I>...> index_type;
0044         return nview<Sequence, index_type>(s);
0045     }
0046 }}
0047 
0048 #endif
0049 #endif
0050