1 /*=============================================================================
2 Copyright (c) 2014 Kohei Takahashi
4 Distributed under the Boost Software License, Version 1.0. (See accompanying
5 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 ==============================================================================*/
7 #ifndef BOOST_FUSION_NVIEW_IMPL_17122014_1948
8 #define BOOST_FUSION_NVIEW_IMPL_17122014_1948
10 #include <boost/fusion/support/config.hpp>
11 #include <boost/fusion/container/vector/detail/config.hpp>
13 ///////////////////////////////////////////////////////////////////////////////
14 // Without variadics, we will use the PP version
15 ///////////////////////////////////////////////////////////////////////////////
16 #if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
17 # include <boost/fusion/view/nview/detail/cpp03/nview_impl.hpp>
20 ///////////////////////////////////////////////////////////////////////////////
22 ///////////////////////////////////////////////////////////////////////////////
23 #include <boost/fusion/container/vector.hpp>
24 #include <boost/mpl/int.hpp>
26 namespace boost { namespace fusion
30 template <typename Sequence, int ...I>
33 typedef vector<mpl::int_<I>...> index_type;
34 typedef nview<Sequence, index_type> type;
38 template <int ...I, typename Sequence>
39 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
40 inline nview<Sequence, vector<mpl::int_<I>...> >
43 typedef vector<mpl::int_<I>...> index_type;
44 return nview<Sequence, index_type>(s);