forked from boostorg/fusion
Replace some usage of std::forward to static_cast.
For more details, See inline comment of include/boost/fusion/support/config.hpp .
This commit is contained in:
@@ -43,7 +43,7 @@ namespace boost { namespace fusion
|
||||
template <typename Arg>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
back_extended_deque(Deque const& deque, Arg&& val)
|
||||
: base(std::forward<Arg>(val), deque)
|
||||
: base(BOOST_FUSION_FWD_ELEM(Arg, val), deque)
|
||||
{}
|
||||
#endif
|
||||
};
|
||||
|
@@ -139,7 +139,7 @@ namespace boost { namespace fusion
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit deque(Head_&& head, Tail_&&... tail)
|
||||
: base(detail::deque_keyed_values<Head, Tail...>
|
||||
::forward_(std::forward<Head_>(head), std::forward<Tail_>(tail)...))
|
||||
::forward_(BOOST_FUSION_FWD_ELEM(Head_, head), BOOST_FUSION_FWD_ELEM(Tail_, tail)...))
|
||||
{}
|
||||
#endif
|
||||
|
||||
@@ -171,7 +171,7 @@ namespace boost { namespace fusion
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
deque& operator=(T&& rhs)
|
||||
{
|
||||
base::operator=(std::forward<T>(rhs));
|
||||
base::operator=(BOOST_FUSION_FWD_ELEM(T, rhs));
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
@@ -136,7 +136,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
explicit deque(T0_&& t0
|
||||
, typename enable_if<is_convertible<T0_, T0> >::type* /*dummy*/ = 0
|
||||
)
|
||||
: base(std::forward<T0_>(t0), detail::nil_keyed_element())
|
||||
: base(BOOST_FUSION_FWD_ELEM(T0_, t0), detail::nil_keyed_element())
|
||||
{}
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
explicit deque(deque&& rhs)
|
||||
@@ -152,7 +152,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
deque&
|
||||
operator=(T&& rhs)
|
||||
{
|
||||
base::operator=(std::forward<T>(rhs));
|
||||
base::operator=(BOOST_FUSION_FWD_ELEM(T, rhs));
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
@@ -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, _) BOOST_FUSION_FWD_ELEM(T_##n, t##n)
|
||||
|
||||
#include <boost/preprocessor/iterate.hpp>
|
||||
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
||||
|
@@ -20,7 +20,7 @@
|
||||
|
||||
#define FUSION_HASH #
|
||||
#define FUSION_DEQUE_KEYED_VALUES_FORWARD(z, n, _) \
|
||||
std::forward<BOOST_PP_CAT(T_, n)>(BOOST_PP_CAT(t, n))
|
||||
BOOST_FUSION_FWD_ELEM(BOOST_PP_CAT(T_, n), BOOST_PP_CAT(t, n))
|
||||
|
||||
#define BOOST_PP_FILENAME_1 \
|
||||
<boost/fusion/container/deque/detail/cpp03/deque_keyed_values_call.hpp>
|
||||
@@ -55,7 +55,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
static type forward_(BOOST_PP_ENUM_BINARY_PARAMS(N, T_, && t))
|
||||
{
|
||||
return type(std::forward<T_0>(t0),
|
||||
return type(BOOST_FUSION_FWD_ELEM(T_0, t0),
|
||||
deque_keyed_values_impl<
|
||||
next_index
|
||||
#if N > 1
|
||||
|
@@ -45,9 +45,9 @@ namespace boost { namespace fusion { namespace detail
|
||||
static type forward_(Head_&& head, Tail_&&... tail)
|
||||
{
|
||||
return type(
|
||||
std::forward<Head_>(head)
|
||||
BOOST_FUSION_FWD_ELEM(Head_, head)
|
||||
, deque_keyed_values_impl<next_index, Tail_...>::
|
||||
forward_(std::forward<Tail_>(tail)...)
|
||||
forward_(BOOST_FUSION_FWD_ELEM(Tail_, tail)...)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@@ -59,8 +59,8 @@ namespace boost { namespace fusion { namespace detail
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
keyed_element(keyed_element&& rhs)
|
||||
: Rest(std::forward<Rest>(rhs.forward_base()))
|
||||
, value_(std::forward<Value>(rhs.value_))
|
||||
: Rest(BOOST_FUSION_FWD_ELEM(Rest, rhs.forward_base()))
|
||||
, value_(BOOST_FUSION_FWD_ELEM(Value, rhs.value_))
|
||||
{}
|
||||
#endif
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
Rest&& forward_base()
|
||||
{
|
||||
return std::forward<Rest>(*static_cast<Rest*>(this));
|
||||
return BOOST_FUSION_FWD_ELEM(Rest, *static_cast<Rest*>(this));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -115,8 +115,8 @@ namespace boost { namespace fusion { namespace detail
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
keyed_element(Value&& value, Rest&& rest)
|
||||
: Rest(std::forward<Rest>(rest))
|
||||
, value_(std::forward<Value>(value))
|
||||
: Rest(BOOST_FUSION_FWD_ELEM(Rest, rest))
|
||||
, value_(BOOST_FUSION_FWD_ELEM(Value, value))
|
||||
{}
|
||||
#endif
|
||||
|
||||
@@ -147,7 +147,7 @@ namespace boost { namespace fusion { namespace detail
|
||||
keyed_element& operator=(keyed_element&& rhs)
|
||||
{
|
||||
base::operator=(std::forward<keyed_element>(rhs));
|
||||
value_ = std::forward<Value>(rhs.value_);
|
||||
value_ = BOOST_FUSION_FWD_ELEM(Value, rhs.value_);
|
||||
return *this;
|
||||
}
|
||||
#endif
|
||||
|
@@ -42,7 +42,7 @@ namespace boost { namespace fusion
|
||||
template <typename Arg>
|
||||
BOOST_FUSION_GPU_ENABLED
|
||||
front_extended_deque(Deque const& deque, Arg&& val)
|
||||
: base(std::forward<Arg>(val), deque)
|
||||
: base(BOOST_FUSION_FWD_ELEM(Arg, val), deque)
|
||||
{}
|
||||
#endif
|
||||
};
|
||||
|
Reference in New Issue
Block a user