File indexing completed on 2024-11-16 09:08:51
0001
0002
0003
0004
0005
0006
0007
0008 #if !defined(BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901)
0009 #define BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901
0010
0011 #include <boost/fusion/support/config.hpp>
0012 #include <boost/fusion/support/detail/access.hpp>
0013 #include <boost/fusion/container/deque/detail/keyed_element.hpp>
0014 #include <boost/mpl/int.hpp>
0015
0016 namespace boost { namespace fusion { namespace detail
0017 {
0018 template<typename Key, typename Value, typename Rest>
0019 struct keyed_element;
0020
0021 template <typename N, typename ...Elements>
0022 struct deque_keyed_values_impl;
0023
0024 template <typename N, typename Head, typename ...Tail>
0025 struct deque_keyed_values_impl<N, Head, Tail...>
0026 {
0027 typedef mpl::int_<(N::value + 1)> next_index;
0028 typedef typename deque_keyed_values_impl<next_index, Tail...>::type tail;
0029 typedef keyed_element<N, Head, tail> type;
0030
0031 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0032 static type construct(
0033 typename detail::call_param<Head>::type head
0034 , typename detail::call_param<Tail>::type... tail)
0035 {
0036 return type(
0037 head
0038 , deque_keyed_values_impl<next_index, Tail...>::construct(tail...)
0039 );
0040 }
0041 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
0042 template <typename Head_, typename ...Tail_>
0043 BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0044 static type forward_(Head_&& head, Tail_&&... tail)
0045 {
0046 return type(
0047 BOOST_FUSION_FWD_ELEM(Head_, head)
0048 , deque_keyed_values_impl<next_index, Tail_...>::
0049 forward_(BOOST_FUSION_FWD_ELEM(Tail_, tail)...)
0050 );
0051 }
0052 #endif
0053 };
0054
0055 struct nil_keyed_element;
0056
0057 template <typename N>
0058 struct deque_keyed_values_impl<N>
0059 {
0060 typedef nil_keyed_element type;
0061
0062 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0063 static type construct() { return type(); }
0064
0065 #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
0066 BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
0067 static type forward_() { return type(); }
0068 #endif
0069 };
0070
0071 template <typename ...Elements>
0072 struct deque_keyed_values
0073 : deque_keyed_values_impl<mpl::int_<0>, Elements...> {};
0074 }}}
0075
0076 #endif