1 /*=============================================================================
2 Copyright (c) 2005-2012 Joel de Guzman
3 Copyright (c) 2005-2006 Dan Marsden
5 Distributed under the Boost Software License, Version 1.0. (See accompanying
6 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 ==============================================================================*/
8 #if !defined(BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901)
9 #define BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901
11 #include <boost/fusion/container/deque/detail/keyed_element.hpp>
12 #include <boost/type_traits/add_reference.hpp>
13 #include <boost/type_traits/add_const.hpp>
14 #include <boost/mpl/int.hpp>
16 namespace boost { namespace fusion { namespace detail
18 template<typename Key, typename Value, typename Rest>
21 template <typename N, typename ...Elements>
22 struct deque_keyed_values_impl;
24 template <typename N, typename Head, typename ...Tail>
25 struct deque_keyed_values_impl<N, Head, Tail...>
27 typedef mpl::int_<(N::value + 1)> next_index;
28 typedef typename deque_keyed_values_impl<next_index, Tail...>::type tail;
29 typedef keyed_element<N, Head, tail> type;
32 typename detail::call_param<Head>::type head
33 , typename detail::call_param<Tail>::type... tail)
37 , deque_keyed_values_impl<next_index, Tail...>::call(tail...)
42 struct nil_keyed_element;
45 struct deque_keyed_values_impl<N>
47 typedef nil_keyed_element type;
48 static type call() { return type(); }
51 template <typename ...Elements>
52 struct deque_keyed_values
53 : deque_keyed_values_impl<mpl::int_<0>, Elements...> {};