File indexing completed on 2025-01-18 09:33:52
0001
0002
0003
0004
0005
0006
0007 #ifndef FUSION_AS_SET_11062014_2121
0008 #define FUSION_AS_SET_11062014_2121
0009
0010 #include <boost/fusion/support/config.hpp>
0011 #include <boost/fusion/container/set/set_fwd.hpp>
0012
0013
0014
0015
0016 #if !defined(BOOST_FUSION_HAS_VARIADIC_SET)
0017 # include <boost/fusion/container/set/detail/cpp03/as_set.hpp>
0018 #else
0019
0020
0021
0022
0023 #include <boost/fusion/support/detail/index_sequence.hpp>
0024 #include <boost/fusion/container/set/set.hpp>
0025 #include <boost/fusion/iterator/value_of.hpp>
0026 #include <boost/fusion/iterator/deref.hpp>
0027 #include <boost/fusion/iterator/advance.hpp>
0028 #include <cstddef>
0029
0030 namespace boost { namespace fusion { namespace detail
0031 {
0032 BOOST_FUSION_BARRIER_BEGIN
0033
0034 template <int size
0035 , typename = typename detail::make_index_sequence<size>::type>
0036 struct as_set;
0037
0038 template <int size, std::size_t ...Indices>
0039 struct as_set<size, detail::index_sequence<Indices...> >
0040 {
0041 template <typename I>
0042 struct apply
0043 {
0044 typedef set<
0045 typename result_of::value_of<
0046 typename result_of::advance_c<I, Indices>::type
0047 >::type...
0048 > type;
0049 };
0050
0051 template <typename Iterator>
0052 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0053 static typename apply<Iterator>::type
0054 call(Iterator const& i)
0055 {
0056 typedef apply<Iterator> gen;
0057 typedef typename gen::type result;
0058 return result(*advance_c<Indices>(i)...);
0059 }
0060 };
0061
0062 BOOST_FUSION_BARRIER_END
0063 }}}
0064
0065 #endif
0066 #endif
0067