forked from boostorg/fusion
MSVC (VC11) fixes for latest updates
[SVN r82634]
This commit is contained in:
@ -13,7 +13,7 @@
|
||||
#error "C++03 only! This file should not have been included"
|
||||
#endif
|
||||
|
||||
#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward<T##n>(t##n)
|
||||
#define FUSION_DEQUE_FORWARD_CTOR_FORWARD(z, n, _) std::forward<T_##n>(t##n)
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
||||
@ -30,14 +30,21 @@
|
||||
|
||||
#define N BOOST_PP_ITERATION()
|
||||
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, typename add_reference<typename add_const<T, >::type>::type t))
|
||||
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t)))
|
||||
{}
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t))
|
||||
#else
|
||||
|
||||
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T, const& t))
|
||||
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::construct(BOOST_PP_ENUM_PARAMS(N, t)))
|
||||
{}
|
||||
|
||||
template <BOOST_PP_ENUM_PARAMS(N, typename T_)>
|
||||
deque(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t))
|
||||
: base(detail::deque_keyed_values<BOOST_PP_ENUM_PARAMS(N, T)>::
|
||||
forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _)))
|
||||
forward_(BOOST_PP_ENUM(N, FUSION_DEQUE_FORWARD_CTOR_FORWARD, _)))
|
||||
{}
|
||||
#endif
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
|
||||
#define FUSION_DEQUE_KEYED_VALUES_FORWARD(z, n, _) \
|
||||
std::forward<BOOST_PP_CAT(T, n)>(BOOST_PP_CAT(t, n))
|
||||
std::forward<BOOST_PP_CAT(T_, n)>(BOOST_PP_CAT(t, n))
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/container/deque/detail/deque_keyed_values_call.hpp>
|
||||
@ -40,16 +40,17 @@
|
||||
#if N > 1
|
||||
, BOOST_PP_ENUM_SHIFTED_PARAMS(N, T)
|
||||
#endif
|
||||
>::call(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t)));
|
||||
>::construct(BOOST_PP_ENUM_SHIFTED_PARAMS(N, t)));
|
||||
}
|
||||
|
||||
static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T, && t))
|
||||
template <BOOST_PP_ENUM_PARAMS(N, typename T_)>
|
||||
static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t))
|
||||
{
|
||||
return type(std::forward<T0>(t0),
|
||||
return type(std::forward<T_0>(t0),
|
||||
deque_keyed_values_impl<
|
||||
next_index
|
||||
#if N > 1
|
||||
, BOOST_PP_ENUM_SHIFTED_PARAMS(N, T)
|
||||
, BOOST_PP_ENUM_SHIFTED_PARAMS(N, T_)
|
||||
#endif
|
||||
>::forward_(BOOST_PP_ENUM_SHIFTED(N, FUSION_DEQUE_KEYED_VALUES_FORWARD, _)));
|
||||
}
|
||||
|
@ -78,7 +78,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
typedef typename fusion::result_of::value_of<BOOST_PP_CAT(I, n)>::type \
|
||||
BOOST_PP_CAT(T, n);
|
||||
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/as_deque.hpp>
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/deque/detail/pp_as_deque.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
|
@ -92,8 +92,11 @@ namespace boost { namespace fusion {
|
||||
{}
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
explicit deque(T0&& t0)
|
||||
: base(std::forward<T0>(t0), detail::nil_keyed_element())
|
||||
template <typename T0_>
|
||||
explicit deque(T0_&& t0
|
||||
, typename enable_if<is_convertible<T0_, T0> >::type* /*dummy*/ = 0
|
||||
)
|
||||
: base(std::forward<T0_>(t0), detail::nil_keyed_element())
|
||||
{}
|
||||
|
||||
explicit deque(deque&& rhs)
|
||||
@ -145,6 +148,28 @@ namespace boost { namespace fusion {
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
template <>
|
||||
struct deque<> : detail::nil_keyed_element
|
||||
{
|
||||
typedef deque_tag fusion_tag;
|
||||
typedef bidirectional_traversal_tag category;
|
||||
typedef mpl::int_<0> size;
|
||||
typedef mpl::int_<0> next_up;
|
||||
typedef mpl::int_<0> next_down;
|
||||
typedef mpl::false_ is_view;
|
||||
|
||||
template <typename Sequence>
|
||||
deque(Sequence const&,
|
||||
typename enable_if<
|
||||
mpl::and_<
|
||||
traits::is_sequence<Sequence>
|
||||
, result_of::empty<Sequence>>>::type* /*dummy*/ = 0)
|
||||
{}
|
||||
|
||||
deque() {}
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
|
||||
|
@ -68,7 +68,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
typedef nil_keyed_element type;
|
||||
|
||||
static type call()
|
||||
static type construct()
|
||||
{
|
||||
return type();
|
||||
}
|
||||
|
@ -6,8 +6,8 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
#if !defined(FUSION_DEQUE_TIE_07192005_1242)
|
||||
#define FUSION_DEQUE_TIE_07192005_1242
|
||||
#if !defined(FUSION_PP_DEQUE_TIE_07192005_1242)
|
||||
#define FUSION_PP_DEQUE_TIE_07192005_1242
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
@ -53,7 +53,7 @@ namespace boost { namespace fusion
|
||||
|
||||
#define BOOST_FUSION_REF(z, n, data) BOOST_PP_CAT(T, n)&
|
||||
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/deque_tie.hpp>
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_deque_tie.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
#ifndef BOOST_PP_IS_ITERATING
|
||||
#if !defined(FUSION_MAKE_DEQUE_07162005_0243)
|
||||
#define FUSION_MAKE_DEQUE_07162005_0243
|
||||
#if !defined(FUSION_PP_MAKE_DEQUE_07162005_0243)
|
||||
#define FUSION_MAKE_PP_DEQUE_07162005_0243
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
@ -66,7 +66,10 @@ namespace boost { namespace fusion
|
||||
#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
|
||||
typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
|
||||
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/make_deque.hpp>
|
||||
#define BOOST_FUSION_AS_FUSION_ELEMENT(z, n, data) \
|
||||
typename detail::as_fusion_element<BOOST_PP_CAT(T, n)>::type
|
||||
|
||||
#define BOOST_PP_FILENAME_1 <boost/fusion/container/generation/detail/pp_make_deque.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_DEQUE_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
|
@ -12,14 +12,14 @@
|
||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
|
||||
|
||||
#define FUSION_FORWARD_CTOR_MOVE(z, n, _) std::move(_##n)
|
||||
#define FUSION_FORWARD_CTOR_FORWARD(z, n, _) std::forward<U##n>(_##n)
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/container/vector/detail/vector_forward_ctor.hpp>
|
||||
#define BOOST_PP_ITERATION_LIMITS (1, FUSION_MAX_VECTOR_SIZE)
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#undef FUSION_FORWARD_CTOR_MOVE
|
||||
#undef FUSION_FORWARD_CTOR_FORWARD
|
||||
#endif
|
||||
#else // defined(BOOST_PP_IS_ITERATING)
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -43,7 +43,7 @@
|
||||
explicit
|
||||
#endif
|
||||
vector(BOOST_PP_ENUM_BINARY_PARAMS(N, U, && _))
|
||||
: vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_MOVE, _)) {}
|
||||
: vec(BOOST_PP_ENUM(N, FUSION_FORWARD_CTOR_FORWARD, _)) {}
|
||||
#endif
|
||||
|
||||
#undef N
|
||||
|
Reference in New Issue
Block a user