mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-20 15:52:13 +02:00
hide detail stuff
[SVN r77812]
This commit is contained in:
@ -15,7 +15,7 @@
|
||||
#include <boost/fusion/container/deque/limits.hpp>
|
||||
#include <boost/fusion/container/deque/front_extended_deque.hpp>
|
||||
#include <boost/fusion/container/deque/back_extended_deque.hpp>
|
||||
#include <boost/fusion/container/deque/detail/deque_keyed_values.hpp>
|
||||
#include <boost/fusion/container/deque/detail/cpp03_deque_keyed_values.hpp>
|
||||
#include <boost/fusion/container/deque/detail/deque_initial_size.hpp>
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
|
||||
#include <boost/fusion/container/deque/detail/cpp11_deque_keyed_values.hpp>
|
||||
#include <boost/fusion/container/deque/deque_fwd.hpp>
|
||||
#include <boost/fusion/container/deque/detail/value_at_impl.hpp>
|
||||
#include <boost/fusion/container/deque/detail/at_impl.hpp>
|
||||
@ -27,46 +28,6 @@
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
template<typename Key, typename Value, typename Rest>
|
||||
struct keyed_element;
|
||||
|
||||
template <typename N, typename ...Elements>
|
||||
struct deque_keyed_values_impl;
|
||||
|
||||
template <typename N, typename Head, typename ...Tail>
|
||||
struct deque_keyed_values_impl<N, Head, Tail...>
|
||||
{
|
||||
typedef mpl::int_<(N::value + 1)> next_index;
|
||||
typedef typename deque_keyed_values_impl<next_index, Tail...>::type tail;
|
||||
typedef keyed_element<N, Head, tail> type;
|
||||
|
||||
static type call(
|
||||
typename add_reference<typename add_const<Head>::type>::type head
|
||||
, typename add_reference<typename add_const<Tail>::type>::type... tail)
|
||||
{
|
||||
return type(
|
||||
head
|
||||
, deque_keyed_values_impl<next_index, Tail...>::call(tail...)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
struct nil_keyed_element;
|
||||
|
||||
template <typename N>
|
||||
struct deque_keyed_values_impl<N>
|
||||
{
|
||||
typedef nil_keyed_element type;
|
||||
static type call() { return type(); }
|
||||
};
|
||||
|
||||
template <typename ...Elements>
|
||||
struct deque_keyed_values
|
||||
: deque_keyed_values_impl<mpl::int_<0>, Elements...> {};
|
||||
}
|
||||
|
||||
struct deque_tag;
|
||||
|
||||
template <typename ...Elements>
|
||||
|
@ -0,0 +1,56 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2005-2012 Joel de Guzman
|
||||
Copyright (c) 2005-2006 Dan Marsden
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#if !defined(BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901)
|
||||
#define BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901
|
||||
|
||||
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template<typename Key, typename Value, typename Rest>
|
||||
struct keyed_element;
|
||||
|
||||
template <typename N, typename ...Elements>
|
||||
struct deque_keyed_values_impl;
|
||||
|
||||
template <typename N, typename Head, typename ...Tail>
|
||||
struct deque_keyed_values_impl<N, Head, Tail...>
|
||||
{
|
||||
typedef mpl::int_<(N::value + 1)> next_index;
|
||||
typedef typename deque_keyed_values_impl<next_index, Tail...>::type tail;
|
||||
typedef keyed_element<N, Head, tail> type;
|
||||
|
||||
static type call(
|
||||
typename add_reference<typename add_const<Head>::type>::type head
|
||||
, typename add_reference<typename add_const<Tail>::type>::type... tail)
|
||||
{
|
||||
return type(
|
||||
head
|
||||
, deque_keyed_values_impl<next_index, Tail...>::call(tail...)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
struct nil_keyed_element;
|
||||
|
||||
template <typename N>
|
||||
struct deque_keyed_values_impl<N>
|
||||
{
|
||||
typedef nil_keyed_element type;
|
||||
static type call() { return type(); }
|
||||
};
|
||||
|
||||
template <typename ...Elements>
|
||||
struct deque_keyed_values
|
||||
: deque_keyed_values_impl<mpl::int_<0>, Elements...> {};
|
||||
}}}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user