forked from boostorg/fusion
Merge branch 'develop' of github.com:boostorg/fusion into develop
This commit is contained in:
@ -50,7 +50,7 @@ namespace boost { namespace fusion
|
||||
typedef bidirectional_traversal_tag category;
|
||||
typedef mpl::int_<0> size;
|
||||
typedef mpl::int_<0> next_up;
|
||||
typedef mpl::int_<0> next_down;
|
||||
typedef mpl::int_<-1> next_down;
|
||||
typedef mpl::false_ is_view;
|
||||
|
||||
template <typename Sequence>
|
||||
@ -76,7 +76,7 @@ namespace boost { namespace fusion
|
||||
typedef typename detail::deque_keyed_values<Head, Tail...>::type base;
|
||||
typedef mpl::int_<(sizeof ...(Tail) + 1)> size;
|
||||
typedef mpl::int_<size::value> next_up;
|
||||
typedef mpl::int_<((size::value == 0) ? 0 : -1)> next_down;
|
||||
typedef mpl::int_<-1> next_down;
|
||||
typedef mpl::false_ is_view;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
@ -122,16 +122,11 @@ namespace boost { namespace fusion
|
||||
#endif
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit deque(Head const& head, Tail const&... tail)
|
||||
explicit deque(typename detail::call_param<Head>::type head
|
||||
, typename detail::call_param<Tail>::type... tail)
|
||||
: base(detail::deque_keyed_values<Head, Tail...>::construct(head, tail...))
|
||||
{}
|
||||
|
||||
template <typename Head_, typename ...Tail_>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit deque(Head_ const& head, Tail_ const&... tail)
|
||||
: base(detail::deque_keyed_values<Head_, Tail_...>::construct(head, tail...))
|
||||
{}
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename Head_, typename ...Tail_, typename =
|
||||
typename enable_if<is_convertible<Head_, Head> >::type
|
||||
@ -141,6 +136,14 @@ namespace boost { namespace fusion
|
||||
: base(detail::deque_keyed_values<Head, Tail...>
|
||||
::forward_(BOOST_FUSION_FWD_ELEM(Head_, head), BOOST_FUSION_FWD_ELEM(Tail_, tail)...))
|
||||
{}
|
||||
#else
|
||||
template <typename Head_, typename ...Tail_, typename =
|
||||
typename enable_if<is_convertible<Head_, Head> >::type
|
||||
>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit deque(Head_ const& head, Tail_ const&... tail)
|
||||
: base(detail::deque_keyed_values<Head_, Tail_...>::construct(head, tail...))
|
||||
{}
|
||||
#endif
|
||||
|
||||
template <typename Sequence>
|
||||
|
@ -11,9 +11,8 @@
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#if (defined(BOOST_NO_CXX11_DECLTYPE) \
|
||||
|| defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \
|
||||
|| defined(BOOST_NO_CXX11_RVALUE_REFERENCES)) \
|
||||
#if (defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) \
|
||||
|| defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)) \
|
||||
|| (defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
|
||||
# if defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
|
||||
# undef BOOST_FUSION_HAS_VARIADIC_DEQUE
|
||||
@ -25,7 +24,7 @@
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// With no decltype and variadics, we will use the C++03 version
|
||||
// With no variadics, we will use the C++03 version
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#if !defined(BOOST_FUSION_HAS_VARIADIC_DEQUE)
|
||||
# include <boost/fusion/container/deque/detail/cpp03/deque_fwd.hpp>
|
||||
|
@ -11,9 +11,14 @@
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/iterator_facade.hpp>
|
||||
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/minus.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/type_traits/is_const.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
namespace boost { namespace fusion {
|
||||
|
||||
|
@ -11,9 +11,6 @@
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/container/deque/deque_iterator.hpp>
|
||||
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct deque_tag;
|
||||
@ -29,12 +26,8 @@ namespace boost { namespace fusion
|
||||
template<typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
mpl::if_c<
|
||||
(Sequence::next_down::value == Sequence::next_up::value)
|
||||
, deque_iterator<Sequence, 0>
|
||||
, deque_iterator<Sequence, (Sequence::next_down::value + 1)>
|
||||
>::type
|
||||
typedef
|
||||
deque_iterator<Sequence, (Sequence::next_down::value + 1)>
|
||||
type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
|
@ -18,12 +18,11 @@
|
||||
#include <boost/fusion/container/deque/detail/cpp03/deque_keyed_values.hpp>
|
||||
#include <boost/fusion/container/deque/detail/cpp03/deque_initial_size.hpp>
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
|
||||
#include <boost/fusion/container/deque/deque_fwd.hpp>
|
||||
@ -35,7 +34,6 @@
|
||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
#include <boost/fusion/support/sequence_base.hpp>
|
||||
#include <boost/fusion/support/void.hpp>
|
||||
#include <boost/utility/enable_if.hpp>
|
||||
|
||||
@ -76,8 +74,7 @@ namespace boost { namespace fusion {
|
||||
typedef typename detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type base;
|
||||
typedef typename detail::deque_initial_size<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, T)>::type size;
|
||||
typedef mpl::int_<size::value> next_up;
|
||||
typedef mpl::int_<
|
||||
mpl::if_<mpl::equal_to<size, mpl::int_<0> >, mpl::int_<0>, mpl::int_<-1> >::type::value> next_down;
|
||||
typedef mpl::int_<-1> next_down;
|
||||
typedef mpl::false_ is_view;
|
||||
|
||||
#include <boost/fusion/container/deque/detail/cpp03/deque_forward_ctor.hpp>
|
||||
@ -87,7 +84,7 @@ namespace boost { namespace fusion {
|
||||
{}
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit deque(typename add_reference<typename add_const<T0>::type>::type t0)
|
||||
explicit deque(typename detail::call_param<T0>::type t0)
|
||||
: base(t0, detail::nil_keyed_element())
|
||||
{}
|
||||
|
||||
@ -169,7 +166,7 @@ FUSION_HASH endif
|
||||
typedef bidirectional_traversal_tag category;
|
||||
typedef mpl::int_<0> size;
|
||||
typedef mpl::int_<0> next_up;
|
||||
typedef mpl::int_<0> next_down;
|
||||
typedef mpl::int_<-1> next_down;
|
||||
typedef mpl::false_ is_view;
|
||||
|
||||
template <typename Sequence>
|
||||
|
@ -36,7 +36,7 @@ FUSION_HASH if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || \
|
||||
(defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES))
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t))
|
||||
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename detail::call_param<T, >::type t))
|
||||
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t)))
|
||||
{}
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type construct(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t))
|
||||
static type construct(BOOST_PP_ENUM_BINARY_PARAMS(N, typename detail::call_param<T, >::type t))
|
||||
{
|
||||
return type(t0,
|
||||
deque_keyed_values_impl<
|
||||
|
@ -9,9 +9,8 @@
|
||||
#define BOOST_FUSION_DEQUE_DETAIL_CPP11_DEQUE_KEYED_VALUES_07042012_1901
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/support/detail/access.hpp>
|
||||
#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
|
||||
@ -39,7 +38,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
, deque_keyed_values_impl<next_index, Tail...>::construct(tail...)
|
||||
);
|
||||
}
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
template <typename Head_, typename ...Tail_>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type forward_(Head_&& head, Tail_&&... tail)
|
||||
@ -50,6 +49,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
forward_(BOOST_FUSION_FWD_ELEM(Tail_, tail)...)
|
||||
);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
struct nil_keyed_element;
|
||||
@ -58,10 +58,14 @@ namespace boost { namespace fusion { namespace detail
|
||||
struct deque_keyed_values_impl<N>
|
||||
{
|
||||
typedef nil_keyed_element type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type construct() { return type(); }
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type forward_() { return type(); }
|
||||
#endif
|
||||
};
|
||||
|
||||
template <typename ...Elements>
|
||||
|
@ -11,9 +11,6 @@
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/container/deque/deque_iterator.hpp>
|
||||
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct deque_tag;
|
||||
@ -29,12 +26,8 @@ namespace boost { namespace fusion
|
||||
template<typename Sequence>
|
||||
struct apply
|
||||
{
|
||||
typedef typename
|
||||
mpl::if_c<
|
||||
(Sequence::next_down::value == Sequence::next_up::value)
|
||||
, deque_iterator<Sequence, 0>
|
||||
, deque_iterator<Sequence, Sequence::next_up::value>
|
||||
>::type
|
||||
typedef
|
||||
deque_iterator<Sequence, Sequence::next_up::value>
|
||||
type;
|
||||
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
|
@ -31,7 +31,7 @@
|
||||
#if N == 1
|
||||
explicit
|
||||
#endif
|
||||
map(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& arg))
|
||||
map(BOOST_PP_ENUM_BINARY_PARAMS(N, typename detail::call_param<T, >::type arg))
|
||||
: data(BOOST_PP_ENUM_PARAMS(N, arg)) {}
|
||||
|
||||
#undef N
|
||||
|
12
include/boost/fusion/include/std_tuple.hpp
Normal file
12
include/boost/fusion/include/std_tuple.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2014 Kohei Takahashi
|
||||
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)
|
||||
==============================================================================*/
|
||||
#ifndef FUSION_INCLUDE_STD_TUPLE
|
||||
#define FUSION_INCLUDE_STD_TUPLE
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/adapted/std_tuple.hpp>
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user